Top Description Fields Constructors Methods
io.vertx.core.datagram

public Class DatagramSocketOptions

extends NetworkOptions
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.impl.Arguments, io.vertx.core.json.JsonObject, io.vertx.core.net.NetworkOptions, io.netty.handler.logging.ByteBufFormat

Options used to configure a datagram socket.
Author
Tim Fox

Field Summary

Modifier and TypeField and Description
private boolean
public static final boolean
DEFAULT_BROADCAST

The default value of broadcast for the socket = false

public static final boolean
DEFAULT_IPV6

The default value of use IP v6 = false

public static final boolean
DEFAULT_LOOPBACK_MODE_DISABLED

The default value of loopback disabled = true

public static final String
DEFAULT_MULTICAST_NETWORK_INTERFACE

The default value of multicast network interface = null

public static final int
DEFAULT_MULTICAST_TIME_TO_LIVE

The default value of multicast disabled = -1

public static final boolean
DEFAULT_REUSE_ADDRESS

Hides io.vertx.core.net.NetworkOptions.DEFAULT_REUSE_ADDRESS.

The default value of reuse address = false
private boolean
private boolean
private String
private int
Inherited from io.vertx.core.net.NetworkOptions:
DEFAULT_LOG_ACTIVITY_FORMATDEFAULT_LOG_ENABLEDDEFAULT_RECEIVE_BUFFER_SIZEDEFAULT_REUSE_PORTDEFAULT_SEND_BUFFER_SIZEDEFAULT_TRAFFIC_CLASS

Constructor Summary

AccessConstructor and Description
public
DatagramSocketOptions()

Default constructor

public
DatagramSocketOptions(DatagramSocketOptions
the options to copy
other
)

Copy constructor

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

Constructor to create options from JSON

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the interface address
getMulticastNetworkInterface
()

Get the multicast network interface address

public int

Returns:

the multicast ttl value
getMulticastTimeToLive
()

public int
getReceiveBufferSize()

Overrides io.vertx.core.net.NetworkOptions.getReceiveBufferSize.

Return the TCP receive buffer size, in bytes

public int
getSendBufferSize()

Overrides io.vertx.core.net.NetworkOptions.getSendBufferSize.

Return the TCP send buffer size, in bytes.

public int
private void
init()

public boolean

Returns:

true if the socket can send or receive broadcast packets?
isBroadcast
()

public boolean

Returns:

true if IP v6 be used?
isIpV6
()

public boolean

Returns:

true if loopback mode is disabled
isLoopbackModeDisabled
()

public DatagramSocketOptions
setActivityLogDataFormat(ByteBufFormat
the format to use
activityLogDataFormat
)

Overrides io.vertx.core.net.NetworkOptions.setActivityLogDataFormat.

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

public DatagramSocketOptions

Returns:

a reference to this, so the API can be used fluently
setBroadcast
(boolean
true if the socket can send or receive broadcast packets
broadcast
)

Set if the socket can send or receive broadcast packets

public DatagramSocketOptions

Returns:

a reference to this, so the API can be used fluently
setIpV6
(boolean
true if IP v6 should be used
ipV6
)

Set if IP v6 should be used

public DatagramSocketOptions
setLogActivity(boolean
true for logging the network activity
logEnabled
)

Overrides io.vertx.core.net.NetworkOptions.setLogActivity.

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

public DatagramSocketOptions

Returns:

a reference to this, so the API can be used fluently
setLoopbackModeDisabled
(boolean
true if loopback mode is disabled
loopbackModeDisabled
)

Set if loopback mode is disabled

public DatagramSocketOptions

Returns:

a reference to this, so the API can be used fluently
setMulticastNetworkInterface
(String
the address
multicastNetworkInterface
)

Set the multicast network interface address

public DatagramSocketOptions

Returns:

a reference to this, so the API can be used fluently
setMulticastTimeToLive
(int
the multicast ttl value
multicastTimeToLive
)

Set the multicast ttl value

public DatagramSocketOptions
setReceiveBufferSize(int
the buffers size, in bytes
receiveBufferSize
)

Overrides io.vertx.core.net.NetworkOptions.setReceiveBufferSize.

Set the TCP receive buffer size

public DatagramSocketOptions
setReuseAddress(boolean
the value of reuse address
reuseAddress
)

Overrides io.vertx.core.net.NetworkOptions.setReuseAddress.

Set the value of reuse address

public DatagramSocketOptions
setReusePort(boolean
the value of reuse port
reusePort
)

Overrides io.vertx.core.net.NetworkOptions.setReusePort.

Set the value of reuse port.

public DatagramSocketOptions
setSendBufferSize(int
the buffers size, in bytes
sendBufferSize
)

Overrides io.vertx.core.net.NetworkOptions.setSendBufferSize.

Set the TCP send buffer size

public DatagramSocketOptions
setTrafficClass(int
the value of traffic class
trafficClass
)

Overrides io.vertx.core.net.NetworkOptions.setTrafficClass.

Set the value of traffic class

Inherited from io.vertx.core.net.NetworkOptions:
getActivityLogDataFormatgetLogActivityisReuseAddressisReusePorttoJson

Field Detail

broadcastback to summary
private boolean broadcast
DEFAULT_BROADCASTback to summary
public static final boolean DEFAULT_BROADCAST

The default value of broadcast for the socket = false

DEFAULT_IPV6back to summary
public static final boolean DEFAULT_IPV6

The default value of use IP v6 = false

DEFAULT_LOOPBACK_MODE_DISABLEDback to summary
public static final boolean DEFAULT_LOOPBACK_MODE_DISABLED

The default value of loopback disabled = true

DEFAULT_MULTICAST_NETWORK_INTERFACEback to summary
public static final String DEFAULT_MULTICAST_NETWORK_INTERFACE

The default value of multicast network interface = null

DEFAULT_MULTICAST_TIME_TO_LIVEback to summary
public static final int DEFAULT_MULTICAST_TIME_TO_LIVE

The default value of multicast disabled = -1

DEFAULT_REUSE_ADDRESSback to summary
public static final boolean DEFAULT_REUSE_ADDRESS

Hides io.vertx.core.net.NetworkOptions.DEFAULT_REUSE_ADDRESS.

The default value of reuse address = false

ipV6back to summary
private boolean ipV6
loopbackModeDisabledback to summary
private boolean loopbackModeDisabled
multicastNetworkInterfaceback to summary
private String multicastNetworkInterface
multicastTimeToLiveback to summary
private int multicastTimeToLive

Constructor Detail

DatagramSocketOptionsback to summary
public DatagramSocketOptions()

Default constructor

DatagramSocketOptionsback to summary
public DatagramSocketOptions(DatagramSocketOptions other)

Copy constructor

Parameters
other:DatagramSocketOptions

the options to copy

DatagramSocketOptionsback to summary
public DatagramSocketOptions(JsonObject json)

References Deprecated

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

See corresponding docs for further information.

Constructor to create options from JSON

Parameters
json:JsonObject

the JSON

Method Detail

getMulticastNetworkInterfaceback to summary
public String getMulticastNetworkInterface()

Get the multicast network interface address

Returns:String

the interface address

getMulticastTimeToLiveback to summary
public int getMulticastTimeToLive()
Returns:int

the multicast ttl value

getReceiveBufferSizeback to summary
public int getReceiveBufferSize()

Overrides io.vertx.core.net.NetworkOptions.getReceiveBufferSize.

Doc from io.vertx.core.net.NetworkOptions.getReceiveBufferSize.

Return the TCP receive buffer size, in bytes

Returns:int

the receive buffer size

Annotations
@Override
getSendBufferSizeback to summary
public int getSendBufferSize()

Overrides io.vertx.core.net.NetworkOptions.getSendBufferSize.

Doc from io.vertx.core.net.NetworkOptions.getSendBufferSize.

Return the TCP send buffer size, in bytes.

Returns:int

the send buffer size

Annotations
@Override
getTrafficClassback to summary
public int getTrafficClass()

Overrides io.vertx.core.net.NetworkOptions.getTrafficClass.

Returns:int

Doc from io.vertx.core.net.NetworkOptions.getTrafficClass.

the value of traffic class

Annotations
@Override
initback to summary
private void init()
isBroadcastback to summary
public boolean isBroadcast()
Returns:boolean

true if the socket can send or receive broadcast packets?

isIpV6back to summary
public boolean isIpV6()
Returns:boolean

true if IP v6 be used?

isLoopbackModeDisabledback to summary
public boolean isLoopbackModeDisabled()
Returns:boolean

true if loopback mode is disabled

setActivityLogDataFormatback to summary
public DatagramSocketOptions setActivityLogDataFormat(ByteBufFormat activityLogDataFormat)

Overrides io.vertx.core.net.NetworkOptions.setActivityLogDataFormat.

Doc from io.vertx.core.net.NetworkOptions.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:ByteBufFormat

the format to use

Returns:DatagramSocketOptions

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

Annotations
@Override
setBroadcastback to summary
public DatagramSocketOptions setBroadcast(boolean broadcast)

Set if the socket can send or receive broadcast packets

Parameters
broadcast:boolean

true if the socket can send or receive broadcast packets

Returns:DatagramSocketOptions

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

setIpV6back to summary
public DatagramSocketOptions setIpV6(boolean ipV6)

Set if IP v6 should be used

Parameters
ipV6:boolean

true if IP v6 should be used

Returns:DatagramSocketOptions

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

setLogActivityback to summary
public DatagramSocketOptions setLogActivity(boolean logEnabled)

Overrides io.vertx.core.net.NetworkOptions.setLogActivity.

Doc from io.vertx.core.net.NetworkOptions.setLogActivity.

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

Parameters
logEnabled:boolean

true for logging the network activity

Returns:DatagramSocketOptions

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

Annotations
@Override
setLoopbackModeDisabledback to summary
public DatagramSocketOptions setLoopbackModeDisabled(boolean loopbackModeDisabled)

Set if loopback mode is disabled

Parameters
loopbackModeDisabled:boolean

true if loopback mode is disabled

Returns:DatagramSocketOptions

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

setMulticastNetworkInterfaceback to summary
public DatagramSocketOptions setMulticastNetworkInterface(String multicastNetworkInterface)

Set the multicast network interface address

Parameters
multicastNetworkInterface:String

the address

Returns:DatagramSocketOptions

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

setMulticastTimeToLiveback to summary
public DatagramSocketOptions setMulticastTimeToLive(int multicastTimeToLive)

Set the multicast ttl value

Parameters
multicastTimeToLive:int

the multicast ttl value

Returns:DatagramSocketOptions

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

setReceiveBufferSizeback to summary
public DatagramSocketOptions setReceiveBufferSize(int receiveBufferSize)

Overrides io.vertx.core.net.NetworkOptions.setReceiveBufferSize.

Doc from io.vertx.core.net.NetworkOptions.setReceiveBufferSize.

Set the TCP receive buffer size

Parameters
receiveBufferSize:int

the buffers size, in bytes

Returns:DatagramSocketOptions

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

Annotations
@Override
setReuseAddressback to summary
public DatagramSocketOptions setReuseAddress(boolean reuseAddress)

Overrides io.vertx.core.net.NetworkOptions.setReuseAddress.

Doc from io.vertx.core.net.NetworkOptions.setReuseAddress.

Set the value of reuse address

Parameters
reuseAddress:boolean

the value of reuse address

Returns:DatagramSocketOptions

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

Annotations
@Override
setReusePortback to summary
public DatagramSocketOptions setReusePort(boolean reusePort)

Overrides io.vertx.core.net.NetworkOptions.setReusePort.

Doc from io.vertx.core.net.NetworkOptions.setReusePort.

Set the value of reuse port.

This is only supported by native transports.

Parameters
reusePort:boolean

the value of reuse port

Returns:DatagramSocketOptions

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

Annotations
@Override
setSendBufferSizeback to summary
public DatagramSocketOptions setSendBufferSize(int sendBufferSize)

Overrides io.vertx.core.net.NetworkOptions.setSendBufferSize.

Doc from io.vertx.core.net.NetworkOptions.setSendBufferSize.

Set the TCP send buffer size

Parameters
sendBufferSize:int

the buffers size, in bytes

Returns:DatagramSocketOptions

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

Annotations
@Override
setTrafficClassback to summary
public DatagramSocketOptions setTrafficClass(int trafficClass)

Overrides io.vertx.core.net.NetworkOptions.setTrafficClass.

Doc from io.vertx.core.net.NetworkOptions.setTrafficClass.

Set the value of traffic class

Parameters
trafficClass:int

the value of traffic class

Returns:DatagramSocketOptions

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

Annotations
@Override