Class DefaultClientChannelInitializer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class DefaultClientChannelInitializer extends ClientChannelInitializer
Creates a newly configured ChannelPipeline for a ClientConnection to a node server.
  • Field Details

    • DRASYL_HANDSHAKE_AFTER_WEBSOCKET_HANDSHAKE

      protected static final String DRASYL_HANDSHAKE_AFTER_WEBSOCKET_HANDSHAKE
      See Also:
  • Constructor Details

    • DefaultClientChannelInitializer

      public DefaultClientChannelInitializer(ClientEnvironment environment)
  • Method Details

    • afterPojoMarshalStage

      protected void afterPojoMarshalStage(io.netty.channel.ChannelPipeline pipeline)
      Overrides:
      afterPojoMarshalStage in class DefaultSessionInitializer
    • customStage

      protected void customStage(io.netty.channel.ChannelPipeline pipeline)
      Description copied from class: DefaultSessionInitializer
      Adds ChannelHandler to the ChannelPipeline, after the default initialization has taken place.
      Specified by:
      customStage in class DefaultSessionInitializer
      Parameters:
      pipeline - the ChannelPipeline
    • exceptionStage

      protected void exceptionStage(io.netty.channel.ChannelPipeline pipeline)
      Description copied from class: DefaultSessionInitializer
      Adds ChannelHandler for exception handling to the ChannelPipeline.
      Overrides:
      exceptionStage in class DefaultSessionInitializer
      Parameters:
      pipeline - the ChannelPipeline
    • generateSslContext

      protected io.netty.handler.ssl.SslHandler generateSslContext(io.netty.channel.socket.SocketChannel ch) throws ClientException
      Description copied from class: DefaultSessionInitializer
      Generates a SslHandler that can be added to the ChannelPipeline. If this method returns null, the SslHandler is not added to the ChannelPipeline.
      Specified by:
      generateSslContext in class DefaultSessionInitializer
      Parameters:
      ch - the SocketChannel to initialize a SslHandler
      Returns:
      SslHandler or null
      Throws:
      ClientException