W
- The type of objects written to the client created by this chain.R
- The type of objects read from the client created by this chain.public interface TcpClientInterceptorChain<W,R>
TcpClient
, obtained via InterceptingTcpClient.intercept()
.
Multiple interceptors can be added to this chain by using the various next*()
methods available, before
calling finish()
that returns a new TcpClient
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 |
---|---|
InterceptingTcpClient<W,R> |
finish()
Finish the addition of interceptors and create a new client instance.
|
TcpClientInterceptorChain<W,R> |
next(Interceptor<W,R> interceptor)
Adds a simple interceptor that does not change the type of objects read/written to a connection.
|
<RR> TcpClientInterceptorChain<W,RR> |
nextWithReadTransform(TransformingInterceptor<W,R,W,RR> interceptor)
Adds an interceptor that changes the type of objects read from the connections created by the client provided by
this chain.
|
<WW,RR> TcpClientInterceptorChain<WW,RR> |
nextWithTransform(TransformingInterceptor<W,R,WW,RR> interceptor)
Adds an interceptor that changes the type of objects read and written to the connections created by the client
provided by this chain.
|
<WW> TcpClientInterceptorChain<WW,R> |
nextWithWriteTransform(TransformingInterceptor<W,R,WW,R> interceptor)
Adds an interceptor that changes the type of objects written to the connections created by the client provided by
this chain.
|
TcpClientInterceptorChain<W,R> next(Interceptor<W,R> interceptor)
interceptor
- Interceptor to add.this
<RR> TcpClientInterceptorChain<W,RR> nextWithReadTransform(TransformingInterceptor<W,R,W,RR> interceptor)
interceptor
- Interceptor to add.<WW> TcpClientInterceptorChain<WW,R> nextWithWriteTransform(TransformingInterceptor<W,R,WW,R> interceptor)
interceptor
- Interceptor to add.<WW,RR> TcpClientInterceptorChain<WW,RR> nextWithTransform(TransformingInterceptor<W,R,WW,RR> interceptor)
interceptor
- Interceptor to add.InterceptingTcpClient<W,R> finish()