public abstract class BootstrapHandlers
extends java.lang.Object
Bootstrap and
ServerBootstrap handlers| Modifier and Type | Method and Description |
|---|---|
static ChannelOperations.OnSetup |
channelOperationFactory(io.netty.bootstrap.AbstractBootstrap<?,?> b)
Obtain and remove the current
ChannelOperations.OnSetup from the bootstrap. |
static void |
channelOperationFactory(io.netty.bootstrap.AbstractBootstrap<?,?> b,
ChannelOperations.OnSetup opsFactory)
Set a
ChannelOperations.OnSetup to the passed bootstrap. |
static ConnectionObserver |
childConnectionObserver(io.netty.bootstrap.ServerBootstrap b)
Obtain and remove the current childHandler
ConnectionObserver from the
bootstrap. |
static void |
childConnectionObserver(io.netty.bootstrap.ServerBootstrap b,
ConnectionObserver connectionObserver)
Add a childHandler
ConnectionObserver to the passed bootstrap. |
static ConnectionObserver |
connectionObserver(io.netty.bootstrap.AbstractBootstrap<?,?> b)
Obtain and remove the current
ConnectionObserver from the bootstrap. |
static void |
connectionObserver(io.netty.bootstrap.AbstractBootstrap<?,?> b,
ConnectionObserver connectionObserver)
Add a
ConnectionObserver to the passed bootstrap. |
static void |
finalizeHandler(io.netty.bootstrap.Bootstrap b,
ChannelOperations.OnSetup opsFactory,
ConnectionObserver listener)
Finalize a bootstrap pipeline configuration by turning it into a
ChannelInitializer to safely initialize each child channel. |
static void |
finalizeHandler(io.netty.bootstrap.ServerBootstrap b,
ChannelOperations.OnSetup opsFactory,
ConnectionObserver childListener)
Finalize a server bootstrap pipeline configuration by turning it into a
ChannelInitializer to safely initialize each child channel. |
static <C> C |
findConfiguration(java.lang.Class<C> clazz,
io.netty.channel.ChannelHandler handler)
Find the given typed configuration consumer or return null;
|
static io.netty.bootstrap.Bootstrap |
removeConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name)
Remove a configuration given its unique name from the given
Bootstrap |
static io.netty.bootstrap.ServerBootstrap |
removeConfiguration(io.netty.bootstrap.ServerBootstrap b,
java.lang.String name)
Remove a configuration given its unique name from the given
ServerBootstrap |
static io.netty.bootstrap.Bootstrap |
updateConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name,
java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel> c)
Add the configuration consumer to this
Bootstrap given a unique
configuration name. |
static io.netty.bootstrap.Bootstrap |
updateConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name,
java.util.function.Function<? super io.netty.bootstrap.Bootstrap,? extends java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel>> c)
Add the configuration consumer to this
Bootstrap given a unique
configuration name. |
static io.netty.bootstrap.ServerBootstrap |
updateConfiguration(io.netty.bootstrap.ServerBootstrap b,
java.lang.String name,
java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel> c)
Add the configuration consumer to this
ServerBootstrap given a unique
configuration name. |
static io.netty.bootstrap.Bootstrap |
updateLogSupport(io.netty.bootstrap.Bootstrap b,
io.netty.handler.logging.LoggingHandler handler)
Configure log support for a
Bootstrap |
static io.netty.bootstrap.ServerBootstrap |
updateLogSupport(io.netty.bootstrap.ServerBootstrap b,
io.netty.handler.logging.LoggingHandler handler)
Configure log support for a
ServerBootstrap |
public static void finalizeHandler(io.netty.bootstrap.ServerBootstrap b,
ChannelOperations.OnSetup opsFactory,
ConnectionObserver childListener)
ChannelInitializer to safely initialize each child channel.b - a server bootstrapopsFactory - an operation factorychildListener - a connection observerpublic static void finalizeHandler(io.netty.bootstrap.Bootstrap b,
ChannelOperations.OnSetup opsFactory,
ConnectionObserver listener)
ChannelInitializer to safely initialize each child channel.b - a bootstrapopsFactory - an operation factorylistener - a connection observer@Nullable
public static <C> C findConfiguration(java.lang.Class<C> clazz,
@Nullable
io.netty.channel.ChannelHandler handler)
C - configuration consumer typeclazz - the type of configuration to findhandler - optional handler to scanpublic static io.netty.bootstrap.ServerBootstrap removeConfiguration(io.netty.bootstrap.ServerBootstrap b,
java.lang.String name)
ServerBootstrapb - a server bootstrapname - a configuration namepublic static io.netty.bootstrap.Bootstrap removeConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name)
Bootstrapb - a bootstrapname - a configuration namepublic static void channelOperationFactory(io.netty.bootstrap.AbstractBootstrap<?,?> b,
ChannelOperations.OnSetup opsFactory)
ChannelOperations.OnSetup to the passed bootstrap.b - the bootstrap to scanopsFactory - a new ChannelOperations.OnSetup factorypublic static ChannelOperations.OnSetup channelOperationFactory(io.netty.bootstrap.AbstractBootstrap<?,?> b)
ChannelOperations.OnSetup from the bootstrap.b - the bootstrap to scanChannelOperations.OnSetup factory or nullpublic static void connectionObserver(io.netty.bootstrap.AbstractBootstrap<?,?> b,
ConnectionObserver connectionObserver)
ConnectionObserver to the passed bootstrap.b - the bootstrap to scanconnectionObserver - a new ConnectionObserverpublic static ConnectionObserver connectionObserver(io.netty.bootstrap.AbstractBootstrap<?,?> b)
ConnectionObserver from the bootstrap.b - the bootstrap to scanConnectionObserver or nullpublic static void childConnectionObserver(io.netty.bootstrap.ServerBootstrap b,
ConnectionObserver connectionObserver)
ConnectionObserver to the passed bootstrap.b - the bootstrap to scanconnectionObserver - a new ConnectionObserverpublic static ConnectionObserver childConnectionObserver(io.netty.bootstrap.ServerBootstrap b)
ConnectionObserver from the
bootstrap.b - the bootstrap to scanConnectionObserver or nullpublic static io.netty.bootstrap.Bootstrap updateConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name,
java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel> c)
Bootstrap given a unique
configuration name. Configuration will be run on channel init.b - a bootstrapname - a configuration namec - a configuration consumerpublic static io.netty.bootstrap.Bootstrap updateConfiguration(io.netty.bootstrap.Bootstrap b,
java.lang.String name,
java.util.function.Function<? super io.netty.bootstrap.Bootstrap,? extends java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel>> c)
Bootstrap given a unique
configuration name. Configuration will be run on channel init.b - a bootstrapname - a configuration namec - a deferred configuration consumerpublic static io.netty.bootstrap.ServerBootstrap updateConfiguration(io.netty.bootstrap.ServerBootstrap b,
java.lang.String name,
java.util.function.BiConsumer<ConnectionObserver,? super io.netty.channel.Channel> c)
ServerBootstrap given a unique
configuration name. Configuration will be run on child channel init.b - a server bootstrapname - a configuration namec - a configuration consumerpublic static io.netty.bootstrap.Bootstrap updateLogSupport(io.netty.bootstrap.Bootstrap b,
io.netty.handler.logging.LoggingHandler handler)
Bootstrapb - the bootstrap to setuphandler - the logging handler to setupAbstractBootstrap.handlerpublic static io.netty.bootstrap.ServerBootstrap updateLogSupport(io.netty.bootstrap.ServerBootstrap b,
io.netty.handler.logging.LoggingHandler handler)
ServerBootstrapb - the bootstrap to setuphandler - the logging handler to setupServerBootstrap.childHandler