public class InterceptorFlowController extends Object
HTTPClientInterceptor, the last interceptor in the main chain,
always returns Outcome.RETURN or Outcome.ABORT, never
Outcome.CONTINUE.
Any chain is followed using Interceptor.handleRequest(Exchange) until
it hits Outcome.RETURN or Outcome.ABORT. As the chain is
followed, every interceptor (except those with Flow#REQUEST) are
added to the exchange's stack.
When Outcome.RETURN is hit, the exchange's interceptor stack is
unwound and Interceptor.handleResponse(Exchange) is called for every
interceptor on it.
When Outcome.ABORT is hit, handling is aborted: An
AbortException is thrown and the stack is not unwound. (Note that
this is subject to change: In some future implementation, the stack is to be
unwound in this case and a new method handleAbort(Exchange) is to be called
for every interceptor on it.)| Constructor and Description |
|---|
InterceptorFlowController() |
| Modifier and Type | Method and Description |
|---|---|
void |
invokeHandlers(Exchange exchange,
List<Interceptor> interceptors)
Runs both the request and response handlers: This executes the main interceptor chain.
|
Outcome |
invokeRequestHandlers(Exchange exchange,
List<Interceptor> interceptors)
Runs the request handlers of the given chain.
|
public void invokeHandlers(Exchange exchange, List<Interceptor> interceptors) throws Exception
Exceptionpublic Outcome invokeRequestHandlers(Exchange exchange, List<Interceptor> interceptors) throws Exception
ExceptionCopyright © 2012. All Rights Reserved.