Class TcpClientConfig
java.lang.Object
io.servicetalk.tcp.netty.internal.TcpClientConfig
Configuration for TCP based clients.
-
Constructor Summary
ConstructorsConstructorDescriptionNew instance.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate a read only view of this object.final voidenableWireLogging(String loggerName, LogLevel logLevel, BooleanSupplier logUserData) Enable wire-logging for all connections.final voidflushStrategy(FlushStrategy flushStrategy) SetsFlushStrategyto use for all connections.final <T> voidsocketOption(SocketOption<T> option, T value) Add aSocketOptionthat is applied.Get theClientSslConfig.voidsslConfig(ClientSslConfig sslConfig) Add SSL/TLS related config.final voidtransportConfig(TransportConfig transportConfig) Sets the transport configuration.
-
Constructor Details
-
TcpClientConfig
public TcpClientConfig()New instance. -
TcpClientConfig
Copy constructor.- Parameters:
from- the sourceTcpClientConfigto copy from
-
-
Method Details
-
sslConfig
Get theClientSslConfig.- Returns:
- the
ClientSslConfig, ornullif SSL/TLS is not configured.
-
asReadOnly
Create a read only view of this object.- Returns:
- a read only view of this object.
-
sslConfig
Add SSL/TLS related config.- Parameters:
sslConfig- theClientSslConfig.
-
socketOption
Add aSocketOptionthat is applied.- Type Parameters:
T- the type of the value- Parameters:
option- the option to applyvalue- the value- Throws:
IllegalArgumentException- if theSocketOptionis not supported- See Also:
-
flushStrategy
SetsFlushStrategyto use for all connections.- Parameters:
flushStrategy-FlushStrategyto 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-trueto include user data (e.g. data, headers, etc.).falseto exclude user data and log only network events. This method is invoked for each data object allowing for dynamic behavior.
-
transportConfig
Sets the transport configuration.- Parameters:
transportConfig-TransportConfigto use
-