Class NetworkOptions
java.lang.Object
io.vertx.core.net.NetworkOptions
- Direct Known Subclasses:
DatagramSocketOptions, TCPSSLOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ByteBufFormatThe default logActivity is ByteBufFormat.SIMPLEstatic final booleanThe default log enabled = falsestatic final intThe default value of TCP receive buffer sizestatic final booleanThe default value of reuse addressstatic final booleanThe default value of reuse portstatic final intThe default value of TCP send buffer sizestatic final intThe default value of traffic class -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorNetworkOptions(JsonObject json) Constructor from JSONNetworkOptions(NetworkOptions other) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract intReturn the TCP receive buffer size, in bytesabstract intReturn the TCP send buffer size, in bytes.abstract intabstract booleanabstract booleansetActivityLogDataFormat(ByteBufFormat activityLogDataFormat) Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.setLogActivity(boolean logActivity) Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.abstract NetworkOptionssetReceiveBufferSize(int receiveBufferSize) Set the TCP receive buffer sizeabstract NetworkOptionssetReuseAddress(boolean reuseAddress) Set the value of reuse addressabstract NetworkOptionssetReusePort(boolean reusePort) Set the value of reuse port.abstract NetworkOptionssetSendBufferSize(int sendBufferSize) Set the TCP send buffer sizeabstract NetworkOptionssetTrafficClass(int trafficClass) Set the value of traffic classabstract JsonObjecttoJson()Convert to JSON
-
Field Details
-
DEFAULT_SEND_BUFFER_SIZE
public static final int DEFAULT_SEND_BUFFER_SIZEThe default value of TCP send buffer size- See Also:
-
DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZEThe default value of TCP receive buffer size- See Also:
-
DEFAULT_TRAFFIC_CLASS
public static final int DEFAULT_TRAFFIC_CLASSThe default value of traffic class- See Also:
-
DEFAULT_REUSE_ADDRESS
public static final boolean DEFAULT_REUSE_ADDRESSThe default value of reuse address- See Also:
-
DEFAULT_REUSE_PORT
public static final boolean DEFAULT_REUSE_PORTThe default value of reuse port- See Also:
-
DEFAULT_LOG_ENABLED
public static final boolean DEFAULT_LOG_ENABLEDThe default log enabled = false- See Also:
-
DEFAULT_LOG_ACTIVITY_FORMAT
The default logActivity is ByteBufFormat.SIMPLE
-
-
Constructor Details
-
NetworkOptions
public NetworkOptions()Default constructor -
NetworkOptions
Copy constructor- Parameters:
other- the options to copy
-
NetworkOptions
-
-
Method Details
-
toJson
-
getSendBufferSize
public abstract int getSendBufferSize()Return the TCP send buffer size, in bytes.- Returns:
- the send buffer size
-
setSendBufferSize
Set the TCP send buffer size- Parameters:
sendBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
getReceiveBufferSize
public abstract int getReceiveBufferSize()Return the TCP receive buffer size, in bytes- Returns:
- the receive buffer size
-
setReceiveBufferSize
Set the TCP receive buffer size- Parameters:
receiveBufferSize- the buffers size, in bytes- Returns:
- a reference to this, so the API can be used fluently
-
isReuseAddress
public abstract boolean isReuseAddress()- Returns:
- the value of reuse address
-
setReuseAddress
Set the value of reuse address- Parameters:
reuseAddress- the value of reuse address- Returns:
- a reference to this, so the API can be used fluently
-
getTrafficClass
public abstract int getTrafficClass()- Returns:
- the value of traffic class
-
setTrafficClass
Set the value of traffic class- Parameters:
trafficClass- the value of traffic class- Returns:
- a reference to this, so the API can be used fluently
-
getLogActivity
public boolean getLogActivity()- Returns:
- true when network activity logging is enabled
-
getActivityLogDataFormat
- Returns:
- Netty's logging handler's data format.
-
setLogActivity
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.- Parameters:
logActivity- true for logging the network activity- Returns:
- a reference to this, so the API can be used fluently
-
setActivityLogDataFormat
Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.- Parameters:
activityLogDataFormat- the format to use- Returns:
- a reference to this, so the API can be used fluently
-
isReusePort
public abstract boolean isReusePort()- Returns:
- the value of reuse address - only supported by native transports
-
setReusePort
Set the value of reuse port. This is only supported by native transports.- Parameters:
reusePort- the value of reuse port- Returns:
- a reference to this, so the API can be used fluently
-