public abstract class NetworkOptions extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static io.netty.handler.logging.ByteBufFormat | DEFAULT_LOG_ACTIVITY_FORMATThe default logActivity is ByteBufFormat.SIMPLE | 
| static boolean | DEFAULT_LOG_ENABLEDThe default log enabled = false | 
| static int | DEFAULT_RECEIVE_BUFFER_SIZEThe default value of TCP receive buffer size | 
| static boolean | DEFAULT_REUSE_ADDRESSThe default value of reuse address | 
| static boolean | DEFAULT_REUSE_PORTThe default value of reuse port | 
| static int | DEFAULT_SEND_BUFFER_SIZEThe default value of TCP send buffer size | 
| static int | DEFAULT_TRAFFIC_CLASSThe default value of traffic class | 
| Constructor and Description | 
|---|
| NetworkOptions()Default constructor | 
| NetworkOptions(JsonObject json)Constructor from JSON | 
| NetworkOptions(NetworkOptions other)Copy constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| io.netty.handler.logging.ByteBufFormat | getActivityLogDataFormat() | 
| boolean | getLogActivity() | 
| int | getReceiveBufferSize()Return the TCP receive buffer size, in bytes | 
| int | getSendBufferSize()Return the TCP send buffer size, in bytes. | 
| int | getTrafficClass() | 
| boolean | isReuseAddress() | 
| boolean | isReusePort() | 
| NetworkOptions | setActivityLogDataFormat(io.netty.handler.logging.ByteBufFormat activityLogDataFormat)Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger. | 
| NetworkOptions | setLogActivity(boolean logActivity)Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger. | 
| NetworkOptions | setReceiveBufferSize(int receiveBufferSize)Set the TCP receive buffer size | 
| NetworkOptions | setReuseAddress(boolean reuseAddress)Set the value of reuse address | 
| NetworkOptions | setReusePort(boolean reusePort)Set the value of reuse port. | 
| NetworkOptions | setSendBufferSize(int sendBufferSize)Set the TCP send buffer size | 
| NetworkOptions | setTrafficClass(int trafficClass)Set the value of traffic class | 
| JsonObject | toJson()Convert to JSON | 
public static final int DEFAULT_SEND_BUFFER_SIZE
public static final int DEFAULT_RECEIVE_BUFFER_SIZE
public static final int DEFAULT_TRAFFIC_CLASS
public static final boolean DEFAULT_REUSE_ADDRESS
public static final boolean DEFAULT_REUSE_PORT
public static final boolean DEFAULT_LOG_ENABLED
public static final io.netty.handler.logging.ByteBufFormat DEFAULT_LOG_ACTIVITY_FORMAT
public NetworkOptions()
public NetworkOptions(NetworkOptions other)
other - the options to copypublic NetworkOptions(JsonObject json)
json - the JSONpublic JsonObject toJson()
public int getSendBufferSize()
public NetworkOptions setSendBufferSize(int sendBufferSize)
sendBufferSize - the buffers size, in bytespublic int getReceiveBufferSize()
public NetworkOptions setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize - the buffers size, in bytespublic boolean isReuseAddress()
public NetworkOptions setReuseAddress(boolean reuseAddress)
reuseAddress - the value of reuse addresspublic int getTrafficClass()
public NetworkOptions setTrafficClass(int trafficClass)
trafficClass - the value of traffic classpublic boolean getLogActivity()
@Unstable public io.netty.handler.logging.ByteBufFormat getActivityLogDataFormat()
public NetworkOptions setLogActivity(boolean logActivity)
logActivity - true for logging the network activity@Unstable public NetworkOptions setActivityLogDataFormat(io.netty.handler.logging.ByteBufFormat activityLogDataFormat)
activityLogDataFormat - the format to usepublic boolean isReusePort()
public NetworkOptions setReusePort(boolean reusePort)
reusePort - the value of reuse portCopyright © 2023 Eclipse. All rights reserved.