Package io.lettuce.core.resource
Interface NettyCustomizer
-
public interface NettyCustomizer
Strategy interface to customize nettyBootstrap
andChannel
via callback hooks.
Extending the NettyCustomizer APIContrary 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 Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
afterBootstrapInitialized(Bootstrap bootstrap)
Hook invoked each time the driver creates a new Connection and configures a new instance of Bootstrap for it.default void
afterChannelInitialized(Channel channel)
Hook invoked each time the driver initializes the channel.
-
-
-
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 allSocketOption
s. This is a good place to add extraChannelOption
s to theBootstrap
.- Parameters:
bootstrap
- must not benull
.
-
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 benull
.
-
-