Module io.helidon.nima.webserver
Package io.helidon.nima.webserver
Class ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConnectionConfig>
java.lang.Object
io.helidon.nima.webserver.ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
io.helidon.builder.api.Prototype.Api,io.helidon.builder.api.Prototype.Builder<BUILDER,,PROTOTYPE> ConnectionConfig
- Direct Known Subclasses:
ConnectionConfig.Builder
- Enclosing interface:
ConnectionConfig
public abstract static class ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConnectionConfig>
extends Object
implements io.helidon.builder.api.Prototype.Builder<BUILDER,PROTOTYPE>, ConnectionConfig
Fluent API builder base for
ConnectionConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from interface io.helidon.nima.webserver.ConnectionConfig
ConnectionConfig.Builder, ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConnectionConfig> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSocketOptions(Map<? extends SocketOption<?>, ?> socketOptions) Set an arbitrary socket option.Connect timeout.connectTimeout(Duration connectTimeout) Connect timeout.from(ConnectionConfig prototype) Update this builder from an existing prototype instance.from(ConnectionConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanConfigure socket keep alive.keepAlive(boolean keepAlive) Configure socket keep alive.protected voidHandles providers and interceptors.putSocketOption(SocketOption<?> key, Object socketOption) Set an arbitrary socket option.Read timeout.readTimeout(Duration readTimeout) Read timeout.intSocket receive buffer size.receiveBufferSize(int receiveBufferSize) Socket receive buffer size.booleanSocket reuse address.reuseAddress(boolean reuseAddress) Socket reuse address.intSocket send buffer size.sendBufferSize(int sendBufferSize) Socket send buffer size.Map<SocketOption<?>,Object> Set an arbitrary socket option.socketOptions(Map<? extends SocketOption<?>, ?> socketOptions) Set an arbitrary socket option.booleanThis option may improve performance on some systems.tcpNoDelay(boolean tcpNoDelay) This option may improve performance on some systems.toString()protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, resolveBuilder, self
-
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
Default SO buffer size.- See Also:
-
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and interceptors. -
validatePrototype
protected void validatePrototype()Validates required properties. -
readTimeout
Read timeout. Default is "PT30S"- Parameters:
readTimeout- read timeout- Returns:
- updated builder instance
- See Also:
-
connectTimeout
Connect timeout. Default is "PT10S".- Parameters:
connectTimeout- connect timeout- Returns:
- updated builder instance
- See Also:
-
sendBufferSize
Socket send buffer size. Default is "32768".- Parameters:
sendBufferSize- buffer size, in bytes- Returns:
- updated builder instance
- See Also:
-
receiveBufferSize
Socket receive buffer size. Default is "32768".- Parameters:
receiveBufferSize- buffer size, in bytes- Returns:
- updated builder instance
- See Also:
-
keepAlive
Configure socket keep alive. Default istrue.- Parameters:
keepAlive- keep alive- Returns:
- updated builder instance
- See Also:
-
reuseAddress
Socket reuse address. Default istrue.- Parameters:
reuseAddress- whether to reuse address- Returns:
- updated builder instance
- See Also:
-
tcpNoDelay
This option may improve performance on some systems. Default isfalse.- Parameters:
tcpNoDelay- whether to use TCP_NODELAY, defaults tofalse- Returns:
- updated builder instance
- See Also:
-
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. This method replaces all values with the new ones.- Parameters:
socketOptions- socket options- Returns:
- updated builder instance
- See Also:
-
addSocketOptions
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. This method keeps existing values, then puts all new values into the map.- Parameters:
socketOptions- socket options- Returns:
- updated builder instance
- See Also:
-
putSocketOption
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. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key- key to add or replacesocketOption- new value for the key- Returns:
- updated builder instance
- See Also:
-
readTimeout
Read timeout. Default is "PT30S"- Returns:
- the read timeout
-
connectTimeout
Connect timeout. Default is "PT10S".- Returns:
- the connect timeout
-
sendBufferSize
public int sendBufferSize()Socket send buffer size. Default is "32768".- Returns:
- the send buffer size
-
receiveBufferSize
public int receiveBufferSize()Socket receive buffer size. Default is "32768".- Returns:
- the receive buffer size
-
keepAlive
public boolean keepAlive()Configure socket keep alive. Default istrue.- Returns:
- the keep alive
-
reuseAddress
public boolean reuseAddress()Socket reuse address. Default istrue.- Returns:
- the reuse address
-
tcpNoDelay
public boolean tcpNoDelay()This option may improve performance on some systems. Default isfalse.- Returns:
- the tcp no delay
-
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:
- the socket options
-
toString
-