Module io.helidon.webserver
Package io.helidon.webserver
Class ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends ConnectionConfig>
java.lang.Object
io.helidon.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.Builder<BUILDER,PROTOTYPE>
- 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>
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. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSocketOptions(Map<SocketOption<?>, ?> socketOptions) This method keeps existing values, then puts all new values into the map.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 decorators.putSocketOption(SocketOption<?> key, Object socketOption) This method adds a new value to the map, or replaces it if the key already exists.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<SocketOption<?>, ?> socketOptions) This method replaces all values with the new ones.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, self
-
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
-
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
This method replaces all values with the new ones.- Parameters:
socketOptions- socket options- Returns:
- updated builder instance
- See Also:
-
addSocketOptions
This method keeps existing values, then puts all new values into the map.- Parameters:
socketOptions- socket options- Returns:
- updated builder instance
- See Also:
-
putSocketOption
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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-