SimpleTargetedChainpublic class SimpleTargetedChain extends SimpleChain implements TargetedChainA SimpleTargetedChain has a request handler, a pivot handler, and a response
handler (any of which may themselves be chains). |
Fields Summary |
---|
protected static Log | log | protected Handler | requestHandler | protected Handler | pivotHandler | protected Handler | responseHandler |
Constructors Summary |
---|
public SimpleTargetedChain()Default no-arg constructor.
| public SimpleTargetedChain(Handler handler)Constructor for an instance with effectively only a pivot handler.
pivotHandler = handler;
if (pivotHandler != null) {
addHandler(pivotHandler);
addHandler(new PivotIndicator());
}
| public SimpleTargetedChain(Handler reqHandler, Handler pivHandler, Handler respHandler)Constructor which takes real or null request, pivot, and response
handlers.
init(reqHandler, null, pivHandler, null, respHandler);
|
Methods Summary |
---|
public Handler | getPivotHandler() return( pivotHandler );
| public Handler | getRequestHandler() return( requestHandler );
| public Handler | getResponseHandler() return( responseHandler );
| protected void | init(Handler reqHandler, Handler specialReqHandler, Handler pivHandler, Handler specialRespHandler, Handler respHandler)Initialiser which takes real or null request, pivot, and response
handlers and which allows for special request and response
handlers to be inserted just before and after any pivot handler.
requestHandler = reqHandler;
if (requestHandler != null)
addHandler(requestHandler);
if (specialReqHandler != null)
addHandler(specialReqHandler);
pivotHandler = pivHandler;
if (pivotHandler != null) {
addHandler(pivotHandler);
addHandler(new PivotIndicator());
}
if (specialRespHandler != null)
addHandler(specialRespHandler);
responseHandler = respHandler;
if (responseHandler != null)
addHandler(responseHandler);
|
|