Class TcpClientConfig
- java.lang.Object
-
- io.servicetalk.tcp.netty.internal.TcpClientConfig
-
public final class TcpClientConfig extends java.lang.ObjectConfiguration for TCP based clients.
-
-
Constructor Summary
Constructors Constructor Description TcpClientConfig()New instance.TcpClientConfig(TcpClientConfig from)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadOnlyTcpClientConfigasReadOnly()Create a read only view of this object.voidenableWireLogging(java.lang.String loggerName)Enable wire-logging for all connections.voidenableWireLogging(java.lang.String loggerName, LogLevel logLevel, java.util.function.BooleanSupplier logUserData)Enable wire-logging for all connections.voidflushStrategy(FlushStrategy flushStrategy)SetsFlushStrategyto use for all connections.<T> voidsocketOption(java.net.SocketOption<T> option, T value)Add aSocketOptionthat is applied.SslConfigTypesslConfig()voidsslConfig(SslConfigType sslConfig)Add SSL/TLS related config.
-
-
-
Constructor Detail
-
TcpClientConfig
public TcpClientConfig()
New instance.
-
TcpClientConfig
public TcpClientConfig(TcpClientConfig from)
Copy constructor.- Parameters:
from- the sourceTcpClientConfigto copy from
-
-
Method Detail
-
asReadOnly
public ReadOnlyTcpClientConfig asReadOnly()
Create a read only view of this object.- Returns:
- a read only view of this object.
-
sslConfig
@Nullable public final SslConfigType sslConfig()
-
socketOption
public final <T> void socketOption(java.net.SocketOption<T> option, T value)Add aSocketOptionthat is applied.- Type Parameters:
T- the type of the value- Parameters:
option- the option to applyvalue- the value- Throws:
java.lang.IllegalArgumentException- if theSocketOptionis not supported- See Also:
StandardSocketOptions,ServiceTalkSocketOptions
-
flushStrategy
public final void flushStrategy(FlushStrategy flushStrategy)
SetsFlushStrategyto use for all connections.- Parameters:
flushStrategy-FlushStrategyto use for all connections
-
enableWireLogging
public final void enableWireLogging(java.lang.String loggerName)
Enable wire-logging for all connections. All wire events will be logged at trace level.- Parameters:
loggerName- The name of the logger to log wire events
-
enableWireLogging
public final void enableWireLogging(java.lang.String loggerName, LogLevel logLevel, java.util.function.BooleanSupplier logUserData)Enable wire-logging for all connections. All wire events will be logged at trace level.- 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-trueto include user data (e.g. data, headers, etc.).falseto exclude user data and log only network events.
-
sslConfig
public final void sslConfig(SslConfigType sslConfig)
Add SSL/TLS related config.- Parameters:
sslConfig- theServerSslConfig.
-
-