Class TcpClientConfig

java.lang.Object
io.servicetalk.tcp.netty.internal.TcpClientConfig

public final class TcpClientConfig extends Object
Configuration for TCP based clients.
  • Constructor Details

    • TcpClientConfig

      public TcpClientConfig()
      New instance.
    • TcpClientConfig

      public TcpClientConfig(TcpClientConfig from)
      Copy constructor.
      Parameters:
      from - the source TcpClientConfig to copy from
  • Method Details

    • sslConfig

      @Nullable public ClientSslConfig sslConfig()
      Returns:
      the ClientSslConfig, or null if SSL/TLS is not configured.
    • asReadOnly

      public ReadOnlyTcpClientConfig asReadOnly()
      Create a read only view of this object.
      Returns:
      a read only view of this object.
    • sslConfig

      public void sslConfig(@Nullable ClientSslConfig sslConfig)
      Add SSL/TLS related config.
      Parameters:
      sslConfig - the ClientSslConfig.
    • socketOption

      public final <T> void socketOption(SocketOption<T> option, T value)
      Add a SocketOption that is applied.
      Type Parameters:
      T - the type of the value
      Parameters:
      option - the option to apply
      value - the value
      Throws:
      IllegalArgumentException - if the SocketOption is not supported
      See Also:
    • flushStrategy

      public final void flushStrategy(FlushStrategy flushStrategy)
      Sets FlushStrategy to use for all connections.
      Parameters:
      flushStrategy - FlushStrategy to use for all connections
    • enableWireLogging

      public final void enableWireLogging(String loggerName, LogLevel logLevel, BooleanSupplier logUserData)
      Enable wire-logging for all connections.
      Parameters:
      loggerName - provides the logger to log data/events to/from the wire.
      logLevel - the level to log data/events to/from the wire.
      logUserData - true to include user data (e.g. data, headers, etc.). false to exclude user data and log only network events. This method is invoked for each data object allowing for dynamic behavior.