I - The type of the content of request.O - The type of the content of response.public interface HttpClientInterceptorChain<I,O>
HttpClient, obtained via InterceptingHttpClient.intercept().
Multiple interceptors can be added to this chain by using the various next*() methods available, before
calling finish() that returns a new HttpClient which inherits all the configuration from the parent
client (from which this chain was created) and adds these interceptors.
| Modifier and Type | Method and Description |
|---|---|
InterceptingHttpClient<I,O> |
finish()
Finish the addition of interceptors and create a new client instance.
|
HttpClientInterceptorChain<I,O> |
next(Interceptor<I,O> interceptor)
Adds a simple interceptor that does not change the type of objects read/written to a connection.
|
<OO> HttpClientInterceptorChain<I,OO> |
nextWithReadTransform(TransformingInterceptor<I,O,I,OO> interceptor)
Adds an interceptor that changes the type of objects read from the connections created by the client provided by
this chain.
|
<II,OO> HttpClientInterceptorChain<II,OO> |
nextWithTransform(TransformingInterceptor<I,O,II,OO> interceptor)
Adds an interceptor that changes the type of objects read and written to the connections created by the client
provided by this chain.
|
<II> HttpClientInterceptorChain<II,O> |
nextWithWriteTransform(TransformingInterceptor<I,O,II,O> interceptor)
Adds an interceptor that changes the type of objects written to the connections created by the client provided by
this chain.
|
HttpClientInterceptorChain<I,O> next(Interceptor<I,O> interceptor)
interceptor - Interceptor to add.this<OO> HttpClientInterceptorChain<I,OO> nextWithReadTransform(TransformingInterceptor<I,O,I,OO> interceptor)
interceptor - Interceptor to add.<II> HttpClientInterceptorChain<II,O> nextWithWriteTransform(TransformingInterceptor<I,O,II,O> interceptor)
interceptor - Interceptor to add.<II,OO> HttpClientInterceptorChain<II,OO> nextWithTransform(TransformingInterceptor<I,O,II,OO> interceptor)
interceptor - Interceptor to add.InterceptingHttpClient<I,O> finish()