public interface NettyClientCustomizer
NettyClientCustomizer.Registry
, and live while the context is running. Customizers with
narrower scope are created from the root customizers through
specialization
when new netty channels are created by the
client, e.g. when a new request is made. These specialized customizers will then receive
notifications when a certain step in the pipeline setup is reached, so they can do their own
customizations on the channel and the channel pipeline they received in the specialization step.Modifier and Type | Interface and Description |
---|---|
static class |
NettyClientCustomizer.ChannelRole
Enum to describe the role of the channel passed to
specializeForChannel(Channel, ChannelRole) . |
static interface |
NettyClientCustomizer.Registry
Interface implemented by the HTTP client registry to register customizers.
|
Modifier and Type | Method and Description |
---|---|
default void |
onInitialPipelineBuilt()
Called when the initial connection pipeline has been built, before any incoming data
has been processed.
|
default void |
onRequestPipelineBuilt()
Called when the "final" request pipeline has been built for processing http requests.
|
default void |
onStreamPipelineBuilt()
Called when the stream pipeline has been built, after any TLS or HTTP upgrade handshake.
|
default NettyClientCustomizer |
specializeForChannel(io.netty.channel.Channel channel,
NettyClientCustomizer.ChannelRole role) |
@NonNull default NettyClientCustomizer specializeForChannel(@NonNull io.netty.channel.Channel channel, @NonNull NettyClientCustomizer.ChannelRole role)
channel
- The new channel to specialize for.role
- The role (or scope) of the channel.this
if no specialization needs to take place.default void onInitialPipelineBuilt()
default void onStreamPipelineBuilt()
default void onRequestPipelineBuilt()