public final class TcpServerConfig
extends java.lang.Object
Constructor and Description |
---|
TcpServerConfig() |
Modifier and Type | Method and Description |
---|---|
ReadOnlyTcpServerConfig |
asReadOnly(java.util.List<java.lang.String> supportedAlpnProtocols)
Returns an immutable view of this config, any changes to this config will not alter the returned view.
|
TcpServerConfig |
backlog(int backlog)
The maximum queue length for incoming connection indications (a request to connect) is set to the backlog
parameter.
|
void |
enableWireLogging(java.lang.String loggerName)
Enable wire-logging for all connections.
|
void |
flushStrategy(FlushStrategy flushStrategy)
Sets
FlushStrategy to use for all connections. |
TcpServerConfig |
secure(ReadOnlyServerSecurityConfig securityConfig,
java.lang.String... sniHostnames)
Add security related config.
|
void |
secure(SecurityConfig securityConfig)
Add security related config.
|
<T> void |
socketOption(java.net.SocketOption<T> option,
T value)
Add a
SocketOption that is applied. |
public TcpServerConfig secure(ReadOnlyServerSecurityConfig securityConfig, java.lang.String... sniHostnames)
securityConfig
- the ReadOnlyServerSecurityConfig
for the passed hostnamessniHostnames
- SNI hostnames for which this config is definedthis
public TcpServerConfig backlog(int backlog)
backlog
- the backlog to use when accepting connectionsthis
public ReadOnlyTcpServerConfig asReadOnly(java.util.List<java.lang.String> supportedAlpnProtocols)
supportedAlpnProtocols
- a list of supported protocols for ALPN configurationpublic final <T> void socketOption(java.net.SocketOption<T> option, T value)
SocketOption
that is applied.T
- the type of the valueoption
- the option to applyvalue
- the valuejava.lang.IllegalArgumentException
- if the SocketOption
is not supportedStandardSocketOptions
,
ServiceTalkSocketOptions
public final void flushStrategy(FlushStrategy flushStrategy)
FlushStrategy
to use for all connections.flushStrategy
- FlushStrategy
to use for all connectionspublic final void enableWireLogging(java.lang.String loggerName)
loggerName
- The name of the logger to log wire eventspublic final void secure(SecurityConfig securityConfig)
securityConfig
- the ReadOnlyServerSecurityConfig
to use