Class TcpServerConfig
java.lang.Object
io.vertx.core.net.EndpointConfig
io.vertx.core.net.TcpEndpointConfig
io.vertx.core.net.TcpServerConfig
Configuration of a
NetServer- Author:
- Julien Viet
-
Constructor Summary
ConstructorsConstructorDescriptionTcpServerConfig(NetServerOptions options) TcpServerConfig(TcpServerConfig other) -
Method Summary
Modifier and TypeMethodDescriptionintgetHost()intgetPort()booleansetAcceptBacklog(int acceptBacklog) Set the accept back logSet the hostsetIdleTimeout(Duration idleTimeout) Set the stream idle timeout, zero ornullmeans don't time out.setLogConfig(LogConfig config) Configure the log config: Netty's stream pipeline is configured for logging on Netty's logger.setPort(int port) Set the portsetProxyProtocolTimeout(Duration proxyProtocolTimeout) Set the Proxy protocol timeout, default time unit.setReadIdleTimeout(Duration idleTimeout) Set the stream read idle timeout, zero ornullmeans or null means don't time out.setSsl(boolean ssl) Set whether SSL/TLS is enabledsetTrafficShapingOptions(TrafficShapingOptions trafficShapingOptions) Set traffic shaping options.setUseProxyProtocol(boolean useProxyProtocol) Set whether the server uses the HA Proxy protocolsetWriteIdleTimeout(Duration idleTimeout) Set the stream write idle timeout, zero ornullmeans don't time out.Methods inherited from class TcpEndpointConfig
getTransportConfig, isSsl, setMetricsName, setTransportConfigMethods inherited from class EndpointConfig
getIdleTimeout, getLogConfig, getMetricsName, getReadIdleTimeout, getWriteIdleTimeout
-
Constructor Details
-
TcpServerConfig
public TcpServerConfig() -
TcpServerConfig
-
TcpServerConfig
-
-
Method Details
-
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 classTcpEndpointConfig- 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 classTcpEndpointConfig- 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 classTcpEndpointConfig- Parameters:
idleTimeout- the write idle timeout- Returns:
- a reference to this, so the API can be used fluently
-
setLogConfig
Description copied from class:EndpointConfigConfigure the log config: Netty's stream pipeline is configured for logging on Netty's logger.- Overrides:
setLogConfigin classTcpEndpointConfig- Parameters:
config- the log config- Returns:
- a reference to this, so the API can be used fluently
-
setSsl
Description copied from class:TcpEndpointConfigSet whether SSL/TLS is enabled- Overrides:
setSslin classTcpEndpointConfig- Parameters:
ssl- true if enabled- Returns:
- a reference to this, so the API can be used fluently
-
getPort
public int getPort()- Returns:
- the port
-
setPort
Set the port- Parameters:
port- the port- Returns:
- a reference to this, so the API can be used fluently
-
getHost
- Returns:
- the host
-
setHost
Set the host- Parameters:
host- the host- Returns:
- a reference to this, so the API can be used fluently
-
getAcceptBacklog
public int getAcceptBacklog()- Returns:
- the value of accept backlog
-
setAcceptBacklog
Set the accept back log- Parameters:
acceptBacklog- accept backlog- Returns:
- a reference to this, so the API can be used fluently
-
isUseProxyProtocol
public boolean isUseProxyProtocol()- Returns:
- whether the server uses the HA Proxy protocol
-
setUseProxyProtocol
Set whether the server uses the HA Proxy protocol- Returns:
- a reference to this, so the API can be used fluently
-
getProxyProtocolTimeout
- Returns:
- the Proxy protocol timeout.
-
setProxyProtocolTimeout
Set the Proxy protocol timeout, default time unit.- Parameters:
proxyProtocolTimeout- the Proxy protocol timeout to set- Returns:
- a reference to this, so the API can be used fluently
-
getTrafficShapingOptions
- Returns:
- traffic shaping options used by Net server.
-
setTrafficShapingOptions
Set traffic shaping options. If not specified, traffic is unthrottled.- Parameters:
trafficShapingOptions- options used by traffic handler- Returns:
- a reference to this, so the API can be used fluently
-