Class DefaultClientChannelInitializer

  • 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 Detail

      • DRASYL_HANDSHAKE_AFTER_WEBSOCKET_HANDSHAKE

        protected static final String DRASYL_HANDSHAKE_AFTER_WEBSOCKET_HANDSHAKE
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultClientChannelInitializer

        public DefaultClientChannelInitializer​(ClientEnvironment environment)
    • Method Detail

      • 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