- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
SocketOptions.BuilderBase.SocketOptionsImpl
Socket options.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forSocketOptions.static classSocketOptions.BuilderBase<BUILDER extends SocketOptions.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends SocketOptions> Fluent API builder base forSocketOptions. -
Method Summary
Modifier and TypeMethodDescriptionstatic SocketOptions.Builderbuilder()Create a new fluent API builder to customize configuration.static SocketOptions.Builderbuilder(SocketOptions instance) Create a new fluent API builder from an existing instance.default voidconfigureSocket(Socket socket) Configure socket with defined socket options.Socket connect timeout.static SocketOptionscreate()Create a new instance with default values.static SocketOptionsDeprecated.static SocketOptionsCreate a new instance from configuration.Socket read timeout.booleanConfigure socket keep alive.Map<SocketOption<?>, Object> Arbitrary socket options.Socket receive buffer size.booleanSocket reuse address.Socket send buffer size.booleanThis option may improve performance on some systems.
-
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
Deprecated.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
-
socketOptions
Map<SocketOption<?>,Object> socketOptions()Arbitrary socket options. Socket options that have dedicated methods in this type will be ignored if configured within the map.- Returns:
- custom socket options
-
connectTimeout
Duration connectTimeout()Socket connect timeout. Default is 10 seconds.- Returns:
- connect timeout duration
-
readTimeout
Duration readTimeout()Socket read timeout. Default is 30 seconds.- Returns:
- read timeout duration
-
socketReceiveBufferSize
Socket receive buffer size.- Returns:
- buffer size, in bytes
- See Also:
-
socketSendBufferSize
Socket send buffer size.- Returns:
- buffer size, in bytes
- See Also:
-
socketReuseAddress
boolean socketReuseAddress()Socket reuse address. Default istrue.- Returns:
- whether to reuse address
- See Also:
-
socketKeepAlive
boolean socketKeepAlive()Configure socket keep alive. Default istrue.- Returns:
- keep alive
- See Also:
-
tcpNoDelay
boolean tcpNoDelay()This option may improve performance on some systems. Default isfalse.- Returns:
- whether to use TCP_NODELAY, defaults to
false - See Also:
-
configureSocket
Configure socket with defined socket options.- Parameters:
socket- socket to update
-
create(io.helidon.config.Config)