Top Fields Constructors Methods
io.vertx.core.net

public abstract Class NetworkOptions

extends Object
Class Inheritance
Known Direct Subclasses
io.vertx.core.net.TCPSSLOptions, io.vertx.core.datagram.DatagramSocketOptions
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, .Unstable, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.impl.Arguments, io.vertx.core.json.JsonObject, io.netty.handler.logging.ByteBufFormat

Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private ByteBufFormat
public static final ByteBufFormat
DEFAULT_LOG_ACTIVITY_FORMAT

The default logActivity is ByteBufFormat.SIMPLE

public static final boolean
DEFAULT_LOG_ENABLED

The default log enabled = false

public static final int
DEFAULT_RECEIVE_BUFFER_SIZE

The default value of TCP receive buffer size

public static final boolean
DEFAULT_REUSE_ADDRESS

The default value of reuse address

public static final boolean
DEFAULT_REUSE_PORT

The default value of reuse port

public static final int
DEFAULT_SEND_BUFFER_SIZE

The default value of TCP send buffer size

public static final int
DEFAULT_TRAFFIC_CLASS

The default value of traffic class

private boolean
private int
private boolean
private boolean
private int
private int

Constructor Summary

AccessConstructor and Description
public
NetworkOptions()

Default constructor

public
NetworkOptions(NetworkOptions
the options to copy
other
)

Copy constructor

public
NetworkOptions(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor from JSON

Method Summary

Modifier and TypeMethod and Description
public ByteBufFormat

Returns:

Netty's logging handler's data format.
getActivityLogDataFormat
()

public boolean

Returns:

true when network activity logging is enabled
getLogActivity
()

public int

Returns:

the receive buffer size
getReceiveBufferSize
()

Return the TCP receive buffer size, in bytes

public int

Returns:

the send buffer size
getSendBufferSize
()

Return the TCP send buffer size, in bytes.

public int

Returns:

the value of traffic class
getTrafficClass
()

public boolean

Returns:

the value of reuse address
isReuseAddress
()

public boolean

Returns:

the value of reuse address - only supported by native transports
isReusePort
()

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setActivityLogDataFormat
(ByteBufFormat
the format to use
activityLogDataFormat
)

Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setLogActivity
(boolean
true for logging the network activity
logActivity
)

Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setReceiveBufferSize
(int
the buffers size, in bytes
receiveBufferSize
)

Set the TCP receive buffer size

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setReuseAddress
(boolean
the value of reuse address
reuseAddress
)

Set the value of reuse address

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setReusePort
(boolean
the value of reuse port
reusePort
)

Set the value of reuse port.

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setSendBufferSize
(int
the buffers size, in bytes
sendBufferSize
)

Set the TCP send buffer size

public NetworkOptions

Returns:

a reference to this, so the API can be used fluently
setTrafficClass
(int
the value of traffic class
trafficClass
)

Set the value of traffic class

public JsonObject

Returns:

the JSON
toJson
()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Convert to JSON

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activityLogDataFormatback to summary
private ByteBufFormat activityLogDataFormat
DEFAULT_LOG_ACTIVITY_FORMATback to summary
public static final ByteBufFormat DEFAULT_LOG_ACTIVITY_FORMAT

The default logActivity is ByteBufFormat.SIMPLE

DEFAULT_LOG_ENABLEDback to summary
public static final boolean DEFAULT_LOG_ENABLED

The default log enabled = false

DEFAULT_RECEIVE_BUFFER_SIZEback to summary
public static final int DEFAULT_RECEIVE_BUFFER_SIZE

The default value of TCP receive buffer size

DEFAULT_REUSE_ADDRESSback to summary
public static final boolean DEFAULT_REUSE_ADDRESS

The default value of reuse address

DEFAULT_REUSE_PORTback to summary
public static final boolean DEFAULT_REUSE_PORT

The default value of reuse port

DEFAULT_SEND_BUFFER_SIZEback to summary
public static final int DEFAULT_SEND_BUFFER_SIZE

The default value of TCP send buffer size

DEFAULT_TRAFFIC_CLASSback to summary
public static final int DEFAULT_TRAFFIC_CLASS

The default value of traffic class

logActivityback to summary
private boolean logActivity
receiveBufferSizeback to summary
private int receiveBufferSize
reuseAddressback to summary
private boolean reuseAddress
reusePortback to summary
private boolean reusePort
sendBufferSizeback to summary
private int sendBufferSize
trafficClassback to summary
private int trafficClass

Constructor Detail

NetworkOptionsback to summary
public NetworkOptions()

Default constructor

NetworkOptionsback to summary
public NetworkOptions(NetworkOptions other)

Copy constructor

Parameters
other:NetworkOptions

the options to copy

NetworkOptionsback to summary
public NetworkOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor from JSON

Parameters
json:JsonObject

the JSON

Method Detail

getActivityLogDataFormatback to summary
public ByteBufFormat getActivityLogDataFormat()
Returns:ByteBufFormat

Netty's logging handler's data format.

Annotations
@Unstable
getLogActivityback to summary
public boolean getLogActivity()
Returns:boolean

true when network activity logging is enabled

getReceiveBufferSizeback to summary
public int getReceiveBufferSize()

Return the TCP receive buffer size, in bytes

Returns:int

the receive buffer size

getSendBufferSizeback to summary
public int getSendBufferSize()

Return the TCP send buffer size, in bytes.

Returns:int

the send buffer size

getTrafficClassback to summary
public int getTrafficClass()
Returns:int

the value of traffic class

isReuseAddressback to summary
public boolean isReuseAddress()
Returns:boolean

the value of reuse address

isReusePortback to summary
public boolean isReusePort()
Returns:boolean

the value of reuse address - only supported by native transports

setActivityLogDataFormatback to summary
public NetworkOptions setActivityLogDataFormat(ByteBufFormat activityLogDataFormat)

Set the value of Netty's logging handler's data format: Netty's pipeline is configured for logging on Netty's logger.

Parameters
activityLogDataFormat:ByteBufFormat

the format to use

Returns:NetworkOptions

a reference to this, so the API can be used fluently

Annotations
@Unstable
setLogActivityback to summary
public NetworkOptions setLogActivity(boolean logActivity)

Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.

Parameters
logActivity:boolean

true for logging the network activity

Returns:NetworkOptions

a reference to this, so the API can be used fluently

setReceiveBufferSizeback to summary
public NetworkOptions setReceiveBufferSize(int receiveBufferSize)

Set the TCP receive buffer size

Parameters
receiveBufferSize:int

the buffers size, in bytes

Returns:NetworkOptions

a reference to this, so the API can be used fluently

setReuseAddressback to summary
public NetworkOptions setReuseAddress(boolean reuseAddress)

Set the value of reuse address

Parameters
reuseAddress:boolean

the value of reuse address

Returns:NetworkOptions

a reference to this, so the API can be used fluently

setReusePortback to summary
public NetworkOptions setReusePort(boolean reusePort)

Set the value of reuse port.

This is only supported by native transports.

Parameters
reusePort:boolean

the value of reuse port

Returns:NetworkOptions

a reference to this, so the API can be used fluently

setSendBufferSizeback to summary
public NetworkOptions setSendBufferSize(int sendBufferSize)

Set the TCP send buffer size

Parameters
sendBufferSize:int

the buffers size, in bytes

Returns:NetworkOptions

a reference to this, so the API can be used fluently

setTrafficClassback to summary
public NetworkOptions setTrafficClass(int trafficClass)

Set the value of traffic class

Parameters
trafficClass:int

the value of traffic class

Returns:NetworkOptions

a reference to this, so the API can be used fluently

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Convert to JSON

Returns:JsonObject

the JSON