public class TcpClientChannelInitializer extends java.lang.Object implements ChannelInitializer
ChannelInitializer
for TCP client.Constructor and Description |
---|
TcpClientChannelInitializer(ReadOnlyTcpClientConfig config,
ConnectionObserver observer)
Creates a
ChannelInitializer for the config . |
TcpClientChannelInitializer(ReadOnlyTcpClientConfig config,
ConnectionObserver observer,
boolean deferSslHandler)
Creates a
ChannelInitializer for the config . |
Modifier and Type | Method and Description |
---|---|
void |
init(io.netty.channel.Channel channel)
Configures the passed
Channel . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, defaultInitializer
public TcpClientChannelInitializer(ReadOnlyTcpClientConfig config, ConnectionObserver observer)
ChannelInitializer
for the config
.config
- to use for initialization.observer
- ConnectionObserver
to report network events.public TcpClientChannelInitializer(ReadOnlyTcpClientConfig config, ConnectionObserver observer, boolean deferSslHandler)
ChannelInitializer
for the config
.config
- to use for initialization.observer
- ConnectionObserver
to report network events.deferSslHandler
- true
to wrap the SslHandler
in a DeferSslHandler
.public void init(io.netty.channel.Channel channel)
ChannelInitializer
Channel
.
Typically, an initializer should add handlers to the channel at the end. This makes it possible for the code using the initializer to create the order of the handlers in the pipeline.
init
in interface ChannelInitializer
channel
- Netty Channel
.