Module io.helidon.common.socket
Package io.helidon.common.socket
Class SocketOptions.BuilderBase.SocketOptionsImpl
java.lang.Object
io.helidon.common.socket.SocketOptions.BuilderBase.SocketOptionsImpl
- All Implemented Interfaces:
Prototype.Api
,SocketOptions
- Enclosing class:
SocketOptions.BuilderBase<BUILDER extends SocketOptions.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SocketOptions>
protected static class SocketOptions.BuilderBase.SocketOptionsImpl
extends Object
implements SocketOptions
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.common.socket.SocketOptions
SocketOptions.Builder, SocketOptions.BuilderBase<BUILDER extends SocketOptions.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends SocketOptions> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SocketOptionsImpl
(SocketOptions.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
configureSocket
(Socket socket) Configure socket with defined socket options.Socket connect timeout.boolean
int
hashCode()
Socket read timeout.boolean
Configure socket keep alive.Map
<SocketOption<?>, Object> Arbitrary socket options.Socket receive buffer size.boolean
Socket reuse address.Socket send buffer size.boolean
This option may improve performance on some systems.toString()
-
Constructor Details
-
SocketOptionsImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
socketOptions
Description copied from interface:SocketOptions
Arbitrary socket options. Socket options that have dedicated methods in this type will be ignored if configured within the map.- Specified by:
socketOptions
in interfaceSocketOptions
- Returns:
- custom socket options
-
connectTimeout
Description copied from interface:SocketOptions
Socket connect timeout. Default is 10 seconds.- Specified by:
connectTimeout
in interfaceSocketOptions
- Returns:
- connect timeout duration
-
readTimeout
Description copied from interface:SocketOptions
Socket read timeout. Default is 30 seconds.- Specified by:
readTimeout
in interfaceSocketOptions
- Returns:
- read timeout duration
-
socketReceiveBufferSize
Description copied from interface:SocketOptions
Socket receive buffer size.- Specified by:
socketReceiveBufferSize
in interfaceSocketOptions
- Returns:
- buffer size, in bytes
- See Also:
-
socketSendBufferSize
Description copied from interface:SocketOptions
Socket send buffer size.- Specified by:
socketSendBufferSize
in interfaceSocketOptions
- Returns:
- buffer size, in bytes
- See Also:
-
socketReuseAddress
public boolean socketReuseAddress()Description copied from interface:SocketOptions
Socket reuse address. Default istrue
.- Specified by:
socketReuseAddress
in interfaceSocketOptions
- Returns:
- whether to reuse address
- See Also:
-
socketKeepAlive
public boolean socketKeepAlive()Description copied from interface:SocketOptions
Configure socket keep alive. Default istrue
.- Specified by:
socketKeepAlive
in interfaceSocketOptions
- Returns:
- keep alive
- See Also:
-
tcpNoDelay
public boolean tcpNoDelay()Description copied from interface:SocketOptions
This option may improve performance on some systems. Default isfalse
.- Specified by:
tcpNoDelay
in interfaceSocketOptions
- Returns:
- whether to use TCP_NODELAY, defaults to
false
- See Also:
-
toString
-
equals
-
hashCode
public int hashCode() -
configureSocket
Configure socket with defined socket options.- Parameters:
socket
- socket to update
-