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

    Fields
    Modifier and Type
    Field
    Description
    private final io.netty.handler.ssl.SslHandler
    SSL handler.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClientInitializer(io.netty.handler.ssl.SslHandler handler)
    Creates a new client initializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initChannel(io.netty.channel.socket.SocketChannel ch)
     
    boolean
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • sslHandler

      private final io.netty.handler.ssl.SslHandler sslHandler
      SSL 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 class io.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