Interface NettyCustomizer


  • public interface NettyCustomizer
    Strategy interface to customize netty Bootstrap and Channel via callback hooks.
    Extending the NettyCustomizer API

    Contrary to other driver options, the options available in this class should be considered as advanced feature and as such, they should only be modified by expert users. A misconfiguration introduced by the means of this API can have unexpected results and cause the driver to completely fail to connect.

    Since:
    4.4
    Author:
    Mark Paluch
    • Method Detail

      • afterBootstrapInitialized

        default void afterBootstrapInitialized​(Bootstrap bootstrap)
        Hook invoked each time the driver creates a new Connection and configures a new instance of Bootstrap for it. This hook is called after the driver has applied all SocketOptions. This is a good place to add extra ChannelOptions to the Bootstrap.
        Parameters:
        bootstrap - must not be null.
      • afterChannelInitialized

        default void afterChannelInitialized​(Channel channel)
        Hook invoked each time the driver initializes the channel. This hook is called after the driver has registered all its internal channel handlers, and applied the configured options.
        Parameters:
        channel - must not be null.