- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ConnectionConfig.BuilderBase.ConnectionConfigImpl
Configuration of a server connection (for each connection created by clients).
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forConnectionConfig
.static class
ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends ConnectionConfig> Fluent API builder base forConnectionConfig
. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static ConnectionConfig.Builder
builder
(ConnectionConfig instance) Create a new fluent API builder from an existing instance.Connect timeout.static ConnectionConfig
create()
Create a new instance with default values.static ConnectionConfig
Create a new instance from configuration.boolean
Configure socket keep alive.Read timeout.int
Socket receive buffer size.boolean
Socket reuse address.int
Socket send buffer size.Map
<SocketOption<?>, Object> Set an arbitrary socket option.boolean
Disable Nagle's algorithm by setting TCP_NODELAY to true.
-
Field Details
-
DEFAULT_READ_TIMEOUT_DURATION
Default read timeout duration.- See Also:
-
DEFAULT_CONNECT_TIMEOUT_DURATION
Default connect timeout duration.- See Also:
-
DEFAULT_SO_BUFFER_SIZE
static final int DEFAULT_SO_BUFFER_SIZEDefault SO buffer size.- See Also:
-
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
readTimeout
Duration readTimeout()Read timeout. Default is "PT30S"- Returns:
- read timeout
-
connectTimeout
Duration connectTimeout()Connect timeout. Default is "PT10S".- Returns:
- connect timeout
-
sendBufferSize
int sendBufferSize()Socket send buffer size. Default is 32768.- Returns:
- buffer size, in bytes
- See Also:
-
receiveBufferSize
int receiveBufferSize()Socket receive buffer size. Default is 32768.- Returns:
- buffer size, in bytes
- See Also:
-
keepAlive
boolean keepAlive()Configure socket keep alive. Default istrue
.- Returns:
- keep alive
- See Also:
-
reuseAddress
boolean reuseAddress()Socket reuse address. Default istrue
.- Returns:
- whether to reuse address
- See Also:
-
tcpNoDelay
boolean tcpNoDelay()Disable Nagle's algorithm by setting TCP_NODELAY to true. This can result in better performance on Mac or newer linux kernels for some payload types. Default isfalse
.- Returns:
- whether to use TCP_NODELAY, defaults to
false
- See Also:
-
socketOptions
Map<SocketOption<?>,Object> socketOptions()Set an arbitrary socket option. A mapping of a socket option to its value. Socket options may be system specific. Most commonly supported socket options are available as methods directly.- Returns:
- socket options
- See Also:
-