public class InterceptorFlowController extends Object
HTTPClientInterceptor, the last interceptor in the main chain, always returns
Outcome.CONTINUE. Any chain is followed using
Interceptor.handleRequest(Exchange)until it hits
Outcome.ABORT. As the chain is followed, every interceptor (except those with
Flow#REQUEST) are added to the exchange's stack. When
Outcome.RETURNis hit, the exchange's interceptor stack is unwound and
Interceptor.handleResponse(Exchange)is called for every interceptor on it. When
Outcome.ABORTis hit, handling is aborted: An
AbortExceptionis 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|
|Modifier and Type||Method and Description|
Runs both the request and response handlers: This executes the main interceptor chain.
Runs the request handlers of the given chain.
public void invokeHandlers(Exchange exchange, List<Interceptor> interceptors) throws Exception
public Outcome invokeRequestHandlers(Exchange exchange, List<Interceptor> interceptors) throws Exception
Copyright © 2012. All Rights Reserved.