public abstract static class NettyOptions.Builder<BOOTSTRAP extends AbstractBootstrap<BOOTSTRAP,?>,SO extends NettyOptions<BOOTSTRAP,SO>,BUILDER extends NettyOptions.Builder<BOOTSTRAP,SO,BUILDER>>
extends java.lang.Object
implements java.util.function.Supplier<BUILDER>
| Modifier and Type | Field and Description |
|---|---|
protected BOOTSTRAP |
bootstrapTemplate |
| Modifier | Constructor and Description |
|---|---|
protected |
Builder(BOOTSTRAP bootstrapTemplate) |
| Modifier and Type | Method and Description |
|---|---|
BUILDER |
afterChannelInit(java.util.function.Consumer<? super Channel> afterChannelInit)
Setup a callback called after each
Channel initialization, once
reactor-netty pipeline handlers have been registered. |
BUILDER |
afterNettyContextInit(java.util.function.Consumer<? super NettyContext> afterNettyContextInit)
Setup a callback called after each
Channel initialization, once the
reactor-netty pipeline handlers have been registered and the NettyContext
is available. |
<T> BUILDER |
attr(AttributeKey<T> key,
T value)
Attribute default attribute to the future
Channel connection. |
BUILDER |
channelGroup(ChannelGroup channelGroup)
Provide a
ChannelGroup for each active remote channel will be held in the
provided group. |
BUILDER |
eventLoopGroup(EventLoopGroup eventLoopGroup)
Provide a shared
EventLoopGroup each Connector handler. |
BUILDER |
from(SO options)
Fill the builder with attribute values from the provided options.
|
boolean |
isLoopAvailable() |
BUILDER |
loopResources(LoopResources channelResources)
Provide an
EventLoopGroup supplier. |
BUILDER |
onChannelInit(java.util.function.Predicate<? super Channel> onChannelInit)
Setup a
Predicate for each Channel initialization that can be
used to prevent the Channel's registration. |
<T> BUILDER |
option(ChannelOption<T> key,
T value)
Set a
ChannelOption value for low level connection settings like
SO_TIMEOUT or SO_KEEPALIVE. |
BUILDER |
preferNative(boolean preferNative)
Set the preferred native option.
|
BUILDER |
sslCloseNotifyFlushTimeout(java.time.Duration sslCloseNotifyFlushTimeout)
Set the options to use for configuring SSL close_notify flush timeout.
|
BUILDER |
sslCloseNotifyFlushTimeoutMillis(long sslCloseNotifyFlushTimeoutMillis)
Set the options to use for configuring SSL close_notify flush timeout.
|
BUILDER |
sslCloseNotifyReadTimeout(java.time.Duration sslCloseNotifyReadTimeout)
Set the options to use for configuring SSL close_notify read timeout.
|
BUILDER |
sslCloseNotifyReadTimeoutMillis(long sslCloseNotifyReadTimeoutMillis)
Set the options to use for configuring SSL close_notify read timeout.
|
BUILDER |
sslContext(SslContext sslContext)
Set the options to use for configuring SSL.
|
BUILDER |
sslHandshakeTimeout(java.time.Duration sslHandshakeTimeout)
Set the options to use for configuring SSL handshake timeout.
|
BUILDER |
sslHandshakeTimeoutMillis(long sslHandshakeTimeoutMillis)
Set the options to use for configuring SSL handshake timeout.
|
protected BOOTSTRAP extends AbstractBootstrap<BOOTSTRAP,?> bootstrapTemplate
protected Builder(BOOTSTRAP bootstrapTemplate)
public <T> BUILDER attr(AttributeKey<T> key, T value)
Channel connection. They will
be available via NettyInbound.attr(AttributeKey).T - the attribute typekey - the attribute keyvalue - the attribute valuethisAbstractBootstrap.attr(AttributeKey, Object)public <T> BUILDER option(ChannelOption<T> key, T value)
ChannelOption value for low level connection settings like
SO_TIMEOUT or SO_KEEPALIVE. This will apply to each new channel from remote
peer.T - the option typekey - the option keyvalue - the option valuethisAbstractBootstrap.option(ChannelOption, Object)public final BUILDER preferNative(boolean preferNative)
preferNative - Should the connector prefer native (epoll/kqueue) if availablethispublic final BUILDER loopResources(LoopResources channelResources)
EventLoopGroup supplier.
Note that server might call it twice for both their selection and io loops.channelResources - a selector accepting native runtime expectation and
returning an eventLoopGroupthispublic final boolean isLoopAvailable()
public final BUILDER eventLoopGroup(EventLoopGroup eventLoopGroup)
EventLoopGroup each Connector handler.eventLoopGroup - an eventLoopGroup to sharethispublic final BUILDER channelGroup(ChannelGroup channelGroup)
ChannelGroup for each active remote channel will be held in the
provided group.channelGroup - a ChannelGroup to monitor remote channelthispublic final BUILDER sslContext(SslContext sslContext)
null means
don't use SSL at all (the default).sslContext - The context to set when configuring SSLthispublic final BUILDER sslHandshakeTimeout(java.time.Duration sslHandshakeTimeout)
sslHandshakeTimeout - The timeout Durationthispublic final BUILDER sslHandshakeTimeoutMillis(long sslHandshakeTimeoutMillis)
sslHandshakeTimeoutMillis - The timeout in millisecondsthispublic final BUILDER sslCloseNotifyFlushTimeout(java.time.Duration sslCloseNotifyFlushTimeout)
sslCloseNotifyFlushTimeout - The timeout Durationthispublic final BUILDER sslCloseNotifyFlushTimeoutMillis(long sslCloseNotifyFlushTimeoutMillis)
sslCloseNotifyFlushTimeoutMillis - The timeout in millisecondsthispublic final BUILDER sslCloseNotifyReadTimeout(java.time.Duration sslCloseNotifyReadTimeout)
sslCloseNotifyReadTimeout - The timeout Durationthispublic final BUILDER sslCloseNotifyReadTimeoutMillis(long sslCloseNotifyReadTimeoutMillis)
sslCloseNotifyReadTimeoutMillis - The timeout in millisecondsthispublic final BUILDER afterChannelInit(java.util.function.Consumer<? super Channel> afterChannelInit)
Channel initialization, once
reactor-netty pipeline handlers have been registered.afterChannelInit - the post channel setup handlerthisonChannelInit(Predicate),
afterNettyContextInit(Consumer)public final BUILDER onChannelInit(java.util.function.Predicate<? super Channel> onChannelInit)
Predicate for each Channel initialization that can be
used to prevent the Channel's registration.onChannelInit - predicate to accept or reject the newly created ChannelthisafterChannelInit(Consumer),
afterNettyContextInit(Consumer)public final BUILDER afterNettyContextInit(java.util.function.Consumer<? super NettyContext> afterNettyContextInit)
Channel initialization, once the
reactor-netty pipeline handlers have been registered and the NettyContext
is available.afterNettyContextInit - the post channel setup handlerthisonChannelInit(Predicate),
afterChannelInit(Consumer)