Class QuicClientConfig
Configuration of a Quic client.
The default transport configuration, allows the client to open bidi streams to a server with sensitive defaults values, it does not allow to open uni streams nor allows the server to open streams toward the client.
- Author:
- Julien Viet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe default value of connect timeout = 60 secondsstatic final intThe default value for reconnect attempts = 0static final DurationThe default value for reconnect interval = 1000 msFields inherited from class QuicEndpointConfig
DEFAULT_MAX_STREAM_BIDI_REQUESTS, DEFAULT_MAX_STREAM_UNI_REQUESTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintsetConnectTimeout(Duration connectTimeout) Set the connect timeout.setIdleTimeout(Duration idleTimeout) Set the stream idle timeout, zero ornullmeans don't time out.setKeyLogFile(String keyLogFile) Configures the endpoint to dump the cryptographic secrets using in TLS in theSSLKEYLOGFILEformat.setLocalAddress(SocketAddress localAddress) Set the local address to bind for network connections.setLogConfig(LogConfig config) Configure the log config: Netty's stream pipeline is configured for logging on Netty's logger.setMaxStreamBidiRequests(int maxStreamRequests) Set the maximum number of bidi stream requests per connection that can be queued when the connection stream bidi limit is reached.setMaxStreamUniRequests(int maxStreamRequests) Set the maximum number of unit stream requests per connection that can be queued when the connection stream uni limit is reached.setMetricsName(String metricsName) Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.setQLogConfig(QLogConfig qLogConfig) Set the endpoint QLog config.setReadIdleTimeout(Duration idleTimeout) Set the stream read idle timeout, zero ornullmeans or null means don't time out.setReconnectAttempts(int attempts) Set the value of reconnect attemptssetReconnectInterval(Duration interval) Set the reconnect intervalsetReuseAddress(boolean reuseAddress) Set the value of reuse address, used to bind the UDP socket underpinning the QUIC transport.setTransportConfig(QuicConfig transportConfig) setWriteIdleTimeout(Duration idleTimeout) Set the stream write idle timeout, zero ornullmeans don't time out.Methods inherited from class QuicEndpointConfig
getKeyLogFile, getMaxStreamBidiRequests, getMaxStreamUniRequests, getQLogConfig, getTransportConfig, isReuseAddressMethods inherited from class EndpointConfig
getIdleTimeout, getLogConfig, getMetricsName, getReadIdleTimeout, getWriteIdleTimeout
-
Field Details
-
DEFAULT_CONNECT_TIMEOUT
The default value of connect timeout = 60 seconds -
DEFAULT_RECONNECT_ATTEMPTS
public static final int DEFAULT_RECONNECT_ATTEMPTSThe default value for reconnect attempts = 0- See Also:
-
DEFAULT_RECONNECT_INTERVAL
The default value for reconnect interval = 1000 ms
-
-
Constructor Details
-
QuicClientConfig
public QuicClientConfig() -
QuicClientConfig
-
-
Method Details
-
setTransportConfig
- Overrides:
setTransportConfigin classQuicEndpointConfig
-
setQLogConfig
Description copied from class:QuicEndpointConfigSet the endpoint QLog config.
The config can point to a single file or to a directory where qlog files will be created.
- Overrides:
setQLogConfigin classQuicEndpointConfig- Parameters:
qLogConfig- the qlog config- Returns:
- this exact object instance
-
setKeyLogFile
Description copied from class:QuicEndpointConfigConfigures the endpoint to dump the cryptographic secrets using in TLS in the
SSLKEYLOGFILEformat.The file might exist or will be created (in which case the parent file must exist), content will be appended to the file.
This should be used only for debugging purpose and must not be used in production. This feature is disabled by default.
- Overrides:
setKeyLogFilein classQuicEndpointConfig- Parameters:
keyLogFile- the path to the key log file- Returns:
- this exact object instance
-
setIdleTimeout
Description copied from class:EndpointConfigSet the stream idle timeout, zero ornullmeans don't time out. This determines if a stream will timeout and be closed if no data is received nor sent within the timeout.- Overrides:
setIdleTimeoutin classQuicEndpointConfig- Parameters:
idleTimeout- the idle timeout- Returns:
- a reference to this, so the API can be used fluently
-
setReadIdleTimeout
Description copied from class:EndpointConfigSet the stream read idle timeout, zero or
nullmeans or null means don't time out. This determines if a stream will timeout and be closed if no data is received within the timeout.- Overrides:
setReadIdleTimeoutin classQuicEndpointConfig- Parameters:
idleTimeout- the read idle timeout- Returns:
- a reference to this, so the API can be used fluently
-
setWriteIdleTimeout
Description copied from class:EndpointConfigSet the stream write idle timeout, zero or
nullmeans don't time out. This determines if a stream will timeout and be closed if no data is sent within the timeout.- Overrides:
setWriteIdleTimeoutin classQuicEndpointConfig- Parameters:
idleTimeout- the write idle timeout- Returns:
- a reference to this, so the API can be used fluently
-
setMetricsName
Description copied from class:EndpointConfigSet the metrics name identifying the reported metrics, useful for grouping metrics with the same name.- Overrides:
setMetricsNamein classQuicEndpointConfig- Parameters:
metricsName- the metrics name- Returns:
- a reference to this, so the API can be used fluently
-
setMaxStreamBidiRequests
Description copied from class:QuicEndpointConfigSet the maximum number of bidi stream requests per connection that can be queued when the connection stream bidi limit is reached.- Overrides:
setMaxStreamBidiRequestsin classQuicEndpointConfig- Parameters:
maxStreamRequests- the maximum value
-
setMaxStreamUniRequests
Description copied from class:QuicEndpointConfigSet the maximum number of unit stream requests per connection that can be queued when the connection stream uni limit is reached.- Overrides:
setMaxStreamUniRequestsin classQuicEndpointConfig- Parameters:
maxStreamRequests- the maximum value
-
setLogConfig
Description copied from class:EndpointConfigConfigure the log config: Netty's stream pipeline is configured for logging on Netty's logger.- Overrides:
setLogConfigin classQuicEndpointConfig- Parameters:
config- the log config- Returns:
- a reference to this, so the API can be used fluently
-
setReuseAddress
Description copied from class:QuicEndpointConfigSet the value of reuse address, used to bind the UDP socket underpinning the QUIC transport.- Overrides:
setReuseAddressin classQuicEndpointConfig- Parameters:
reuseAddress- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
getConnectTimeout
- Returns:
- the value of connect timeout
-
setConnectTimeout
Set the connect timeout.- Parameters:
connectTimeout- connect timeout- Returns:
- a reference to this, so the API can be used fluently
-
getLocalAddress
- Returns:
- the local address to bind for network connections.
-
setLocalAddress
Set the local address to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.- Parameters:
localAddress- the local address- Returns:
- a reference to this, so the API can be used fluently
-
getReconnectAttempts
public int getReconnectAttempts()- Returns:
- the value of reconnect attempts
-
setReconnectAttempts
Set the value of reconnect attempts- Parameters:
attempts- the maximum number of reconnect attempts- Returns:
- a reference to this, so the API can be used fluently
-
getReconnectInterval
- Returns:
- the value of reconnect interval
-
setReconnectInterval
Set the reconnect interval- Parameters:
interval- the reconnect interval- Returns:
- a reference to this, so the API can be used fluently
-