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 void
enableWireLogging
(String loggerName, LogLevel logLevel, BooleanSupplier logUserData) Enable wire-logging for all connections.final void
flushStrategy
(FlushStrategy flushStrategy) SetsFlushStrategy
to use for all connections.final <T> void
socketOption
(SocketOption<T> option, T value) Add aSocketOption
that is applied.Get theClientSslConfig
.void
sslConfig
(ClientSslConfig sslConfig) Add SSL/TLS related config.final void
transportConfig
(TransportConfig transportConfig) Sets the transport configuration.
-
Constructor Details
-
TcpClientConfig
public TcpClientConfig()New instance. -
TcpClientConfig
Copy constructor.- Parameters:
from
- the sourceTcpClientConfig
to copy from
-
-
Method Details
-
sslConfig
Get theClientSslConfig
.- Returns:
- the
ClientSslConfig
, ornull
if 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 aSocketOption
that is applied.- Type Parameters:
T
- the type of the value- Parameters:
option
- the option to applyvalue
- the value- Throws:
IllegalArgumentException
- if theSocketOption
is not supported- See Also:
-
flushStrategy
SetsFlushStrategy
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.
-
transportConfig
Sets the transport configuration.- Parameters:
transportConfig
-TransportConfig
to use
-