Interface ChannelInitializer

All Known Implementing Classes:
ConnectionObserverInitializer, CopyByteBufHandlerChannelInitializer, IdleTimeoutInitializer, SniServerChannelInitializer, SslClientChannelInitializer, SslServerChannelInitializer, TcpClientChannelInitializer, TcpServerChannelInitializer, WireLoggingInitializer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ChannelInitializer
Configures a Channel.
  • Method Details

    • init

      void init(io.netty.channel.Channel channel)
      Configures the passed 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.

      Parameters:
      channel - Netty Channel.
    • andThen

      default ChannelInitializer andThen(ChannelInitializer after)
      Returns a new ChannelInitializer which will first invoke this initializer and then after.
      Parameters:
      after - Initializer to call after this.
      Returns:
      A new composite initializer.
    • defaultInitializer

      static ChannelInitializer defaultInitializer()
      Returns:
      Default initializer for ServiceTalk.