public static class ServerOptions.Builder<BUILDER extends ServerOptions.Builder<BUILDER>> extends NettyOptions.Builder<ServerBootstrap,ServerOptions,BUILDER>
bootstrapTemplate| Modifier | Constructor and Description |
|---|---|
protected |
Builder(ServerBootstrap serverBootstrap)
Apply common option via super class then apply
defaultServerOptions(ServerBootstrap)
to the passed bootstrap. |
| Modifier and Type | Method and Description |
|---|---|
<T> BUILDER |
attr(AttributeKey<T> key,
T value)
Attribute default attribute to the future
Channel connection. |
ServerOptions |
build() |
BUILDER |
from(ServerOptions options)
Fill the builder with attribute values from the provided options.
|
BUILDER |
get() |
BUILDER |
host(java.lang.String host)
The host on which this server should listen.
|
BUILDER |
listenAddress(java.net.SocketAddress listenAddress)
The
InetSocketAddress on which this server should listen. |
<T> BUILDER |
option(ChannelOption<T> key,
T value)
Set a
ChannelOption value for low level connection settings like
SO_TIMEOUT or SO_KEEPALIVE. |
BUILDER |
port(int port)
The port on which this server should listen, assuming it should bind to all available addresses.
|
<T> BUILDER |
selectorAttr(AttributeKey<T> key,
T value)
Attribute default attribute to the future
Channel connection. |
<T> BUILDER |
selectorOption(ChannelOption<T> key,
T value)
Set a
ChannelOption value for low level selector channel settings like
SO_TIMEOUT or SO_KEEPALIVE. |
BUILDER |
sslSelfSigned()
Enable SSL service with a self-signed certificate
|
BUILDER |
sslSelfSigned(java.util.function.Consumer<? super SslContextBuilder> configurator)
Enable SSL service with a self-signed certificate and allows extra
parameterization of the self signed
SslContextBuilder. |
afterChannelInit, afterNettyContextInit, channelGroup, eventLoopGroup, isLoopAvailable, loopResources, onChannelInit, preferNative, sslCloseNotifyFlushTimeout, sslCloseNotifyFlushTimeoutMillis, sslCloseNotifyReadTimeout, sslCloseNotifyReadTimeoutMillis, sslContext, sslHandshakeTimeout, sslHandshakeTimeoutMillisprotected Builder(ServerBootstrap serverBootstrap)
defaultServerOptions(ServerBootstrap)
to the passed bootstrap.serverBootstrap - the server bootstrap reference to usepublic final <T> BUILDER attr(AttributeKey<T> key, T value)
Channel connection. They will
be available via NettyInbound.attr(AttributeKey).attr in class NettyOptions.Builder<ServerBootstrap,ServerOptions,BUILDER extends ServerOptions.Builder<BUILDER>>T - the attribute typekey - the attribute keyvalue - the attribute valuethisServerBootstrap.childAttr(AttributeKey, Object)public final <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.option in class NettyOptions.Builder<ServerBootstrap,ServerOptions,BUILDER extends ServerOptions.Builder<BUILDER>>T - the option typekey - the option keyvalue - the option valuethisServerBootstrap.childOption(ChannelOption, Object)public final <T> BUILDER selectorAttr(AttributeKey<T> key, T value)
Channel connection. They will
be available via NettyInbound.attr(AttributeKey).T - the attribute typekey - the attribute keyvalue - the attribute valueServerBootstrap.childAttr(AttributeKey, Object)public final <T> BUILDER selectorOption(ChannelOption<T> key, T value)
ChannelOption value for low level selector channel 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 valuethisServerBootstrap.childOption(ChannelOption, Object)public final BUILDER host(java.lang.String host)
host - The host to bind to.thispublic final BUILDER port(int port)
port - The port to listen on.thispublic final BUILDER listenAddress(java.net.SocketAddress listenAddress)
InetSocketAddress on which this server should listen.listenAddress - the listen addressthispublic final BUILDER sslSelfSigned()
thispublic final BUILDER sslSelfSigned(java.util.function.Consumer<? super SslContextBuilder> configurator)
SslContextBuilder. The builder is
then used to invoke NettyOptions.Builder.sslContext(SslContext).configurator - the builder callback to setup the self-signed SslContextBuilderthispublic final BUILDER from(ServerOptions options)
NettyOptions.Builderfrom in class NettyOptions.Builder<ServerBootstrap,ServerOptions,BUILDER extends ServerOptions.Builder<BUILDER>>options - The instance from which to copy valuesthispublic BUILDER get()
public ServerOptions build()