Package org.ldaptive.transport.netty
Class NettyConnection.ClientInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
org.ldaptive.transport.netty.NettyConnection.ClientInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Enclosing class:
- NettyConnection
private class NettyConnection.ClientInitializer
extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
Sets up the Netty pipeline for this connection. Handler configuration looks like:
+-------------------------------------------------------------------+
| ChannelPipeline |
| |
| +-----------------------+ +-----------+----------+ |
| | InboundMessageHandler | | RequestEncoder | |
| +----------+------------+ +-----------+----------+ |
| /|\ | |
| | | |
| +----------+------------+ | |
| | MessageDecoder | | |
| +----------+------------+ | |
| /|\ | |
| | | |
| +----------+------------+ | |
| | MessageFrameDecoder | | |
| +----------+------------+ | |
| /|\ | |
| | \|/ |
| +----------+------------+ +-----------+----------+ |
| | I/O READ | | I/O WRITE | |
| +----------+------------+ +-----------+----------+ |
| /|\ \|/ |
+---------------+-------------------------------------+-------------+
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final io.netty.handler.ssl.SslHandler
SSL handler. -
Constructor Summary
ConstructorsConstructorDescriptionClientInitializer
(io.netty.handler.ssl.SslHandler handler) Creates a new client initializer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
initChannel
(io.netty.channel.socket.SocketChannel ch) boolean
isSsl()
Returns whether the SSL pipeline is in use.Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
sslHandler
private final io.netty.handler.ssl.SslHandler sslHandlerSSL handler.
-
-
Constructor Details
-
ClientInitializer
ClientInitializer(io.netty.handler.ssl.SslHandler handler) Creates a new client initializer.- Parameters:
handler
- SSL handler or null
-
-
Method Details
-
initChannel
public void initChannel(io.netty.channel.socket.SocketChannel ch) - Specified by:
initChannel
in classio.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
-
isSsl
public boolean isSsl()Returns whether the SSL pipeline is in use.- Returns:
- whether the SSL pipeline is in use
-