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 builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.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.
  • Field Details

    • DEFAULT_READ_TIMEOUT_DURATION

      static final String DEFAULT_READ_TIMEOUT_DURATION
      Default read timeout duration.
      See Also:
    • DEFAULT_CONNECT_TIMEOUT_DURATION

      static final String DEFAULT_CONNECT_TIMEOUT_DURATION
      Default connect timeout duration.
      See Also:
    • DEFAULT_SO_BUFFER_SIZE

      static final String DEFAULT_SO_BUFFER_SIZE
      Default SO buffer size.
      See Also:
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(ConnectionConfig prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(ConnectionConfig.BuilderBase<?,?> builder)
      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

      public BUILDER readTimeout(Duration readTimeout)
      Read timeout. Default is "PT30S"
      Parameters:
      readTimeout - read timeout
      Returns:
      updated builder instance
      See Also:
    • connectTimeout

      public BUILDER connectTimeout(Duration connectTimeout)
      Connect timeout. Default is "PT10S".
      Parameters:
      connectTimeout - connect timeout
      Returns:
      updated builder instance
      See Also:
    • sendBufferSize

      public BUILDER sendBufferSize(int sendBufferSize)
      Socket send buffer size. Default is "32768".
      Parameters:
      sendBufferSize - buffer size, in bytes
      Returns:
      updated builder instance
      See Also:
    • receiveBufferSize

      public BUILDER receiveBufferSize(int receiveBufferSize)
      Socket receive buffer size. Default is "32768".
      Parameters:
      receiveBufferSize - buffer size, in bytes
      Returns:
      updated builder instance
      See Also:
    • keepAlive

      public BUILDER keepAlive(boolean keepAlive)
      Configure socket keep alive. Default is true.
      Parameters:
      keepAlive - keep alive
      Returns:
      updated builder instance
      See Also:
    • reuseAddress

      public BUILDER reuseAddress(boolean reuseAddress)
      Socket reuse address. Default is true.
      Parameters:
      reuseAddress - whether to reuse address
      Returns:
      updated builder instance
      See Also:
    • tcpNoDelay

      public BUILDER tcpNoDelay(boolean tcpNoDelay)
      This option may improve performance on some systems. Default is false.
      Parameters:
      tcpNoDelay - whether to use TCP_NODELAY, defaults to false
      Returns:
      updated builder instance
      See Also:
    • socketOptions

      public BUILDER socketOptions(Map<? extends SocketOption<?>,?> 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

      public BUILDER addSocketOptions(Map<? extends SocketOption<?>,?> 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 keeps existing values, then puts all new values into the map.
      Parameters:
      socketOptions - socket options
      Returns:
      updated builder instance
      See Also:
    • putSocketOption

      public BUILDER putSocketOption(SocketOption<?> key, Object socketOption)
      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 replace
      socketOption - new value for the key
      Returns:
      updated builder instance
      See Also:
    • readTimeout

      public Duration readTimeout()
      Read timeout. Default is "PT30S"
      Returns:
      the read timeout
    • connectTimeout

      public Duration 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 is true.
      Returns:
      the keep alive
    • reuseAddress

      public boolean reuseAddress()
      Socket reuse address. Default is true.
      Returns:
      the reuse address
    • tcpNoDelay

      public boolean tcpNoDelay()
      This option may improve performance on some systems. Default is false.
      Returns:
      the tcp no delay
    • socketOptions

      public 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:
      the socket options
    • toString

      public String toString()
      Overrides:
      toString in class Object