public final class UdpChannel extends Object
ChannelUri.ChannelUri,
ChannelUriStringBuilder| Modifier and Type | Field and Description |
|---|---|
static int |
RESERVED_VALUE_MESSAGE_OFFSET
The offset from the beginning of a payload where the reserved value begins.
|
| Modifier and Type | Method and Description |
|---|---|
String |
canonicalForm()
The canonical form for the channel.
|
static String |
canonicalise(String localParamValue,
InetSocketAddress localData,
String remoteParamValue,
InetSocketAddress remoteData)
Return a string which is a canonical form of the channel suitable for use as a file or directory
name and also as a method of hashing, etc.
|
int |
channelReceiveTimestampOffset()
Offset to store the channel receive timestamp in a user message.
|
int |
channelSendTimestampOffset()
Offset to store the channel send timestamp in a user message.
|
ChannelUri |
channelUri()
Get the
ChannelUri for this channel. |
ControlMode |
controlMode()
The channel's control mode.
|
String |
description()
Used for debugging to get a human-readable description of the channel.
|
static InetSocketAddress |
destinationAddress(ChannelUri uri,
NameResolver nameResolver)
Get the endpoint destination address from the URI.
|
boolean |
equals(Object o)
Channels are considered equal if the
canonicalForm() is equal. |
Long |
groupTag()
Group tag specified for this channel or null if not specified.
|
boolean |
hasExplicitControl()
Does the channel have an explicit control address as used with multi-destination-cast or not?
|
boolean |
hasExplicitEndpoint()
Does the channel have an explicit endpoint address?
|
int |
hashCode()
The hash code for the
canonicalForm(). |
boolean |
hasMulticastTtl()
Has this channel got a multicast TTL value set so that
multicastTtl() is valid. |
boolean |
hasTag()
Has the URI a tag to indicate entity relationships and if
tag() is valid. |
boolean |
isChannelReceiveTimestampEnabled()
Check if channel receive timestamps should be recorded.
|
boolean |
isChannelSendTimestampEnabled()
Check if channel send timestamps should be recorded.
|
boolean |
isDynamicControlMode()
Does the channel have dynamic control mode specified.
|
boolean |
isManualControlMode()
Does the channel have manual control mode specified.
|
boolean |
isMulticast()
Is the channel UDP multicast.
|
boolean |
isMultiDestination()
Is the channel configured as multi-destination.
|
InetSocketAddress |
localControl()
Local control address and port.
|
InetSocketAddress |
localData()
Local data address and port.
|
NetworkInterface |
localInterface()
Local interface to be used by the channel.
|
boolean |
matchesTag(UdpChannel udpChannel)
Does this channel have a tag match to another channel having INADDR_ANY endpoints.
|
int |
multicastTtl()
Multicast TTL value.
|
String |
originalUriString()
Original URI of the channel URI.
|
static UdpChannel |
parse(String channelUriString)
Parse channel URI and create a
UdpChannel using the default name resolver. |
static UdpChannel |
parse(String channelUriString,
NameResolver nameResolver)
Parse channel URI and create a
UdpChannel. |
static UdpChannel |
parse(String channelUriString,
NameResolver nameResolver,
boolean isDestination)
Parse channel URI and create a
UdpChannel. |
static int |
parseBufferLength(ChannelUri channelUri,
String paramName)
Parse a buffer length for a given URI paramName with a format specified by
SystemUtil.parseSize(String, String), clamping the range to 0 <= x <= Integer.MAX_VALUE. |
static ControlMode |
parseControlMode(ChannelUri channelUri)
Parse the control mode from the channel URI.
|
ProtocolFamily |
protocolFamily()
Get the
ProtocolFamily for this channel. |
int |
receiverWindowLength()
Get the receiver window length used as the initial window length for congestion control.
|
int |
receiverWindowLengthOrDefault(int defaultValue)
Get the receiver window length used as the initial window length for congestion control.
|
InetSocketAddress |
remoteControl()
Remote control address information.
|
InetSocketAddress |
remoteData()
Remote data address and port.
|
static InetSocketAddress |
resolve(String endpoint,
String uriParamName,
boolean isReResolution,
NameResolver nameResolver)
Resolve and endpoint into a
InetSocketAddress. |
int |
socketRcvbufLength()
Get the socket receive buffer length.
|
int |
socketRcvbufLengthOrDefault(int defaultValue)
Get the socket receive buffer length.
|
int |
socketSndbufLength()
Get the socket send buffer length.
|
int |
socketSndbufLengthOrDefault(int defaultValue)
Get the socket send buffer length.
|
long |
tag()
Get the tag value on the channel which is only valid if
hasTag() is true. |
String |
toString()
The
canonicalForm() for the channel. |
public static final int RESERVED_VALUE_MESSAGE_OFFSET
public static UdpChannel parse(String channelUriString)
UdpChannel using the default name resolver.channelUriString - to parse.UdpChannel as the result of parsing.InvalidChannelException - if an error occurs.public static UdpChannel parse(String channelUriString, NameResolver nameResolver)
UdpChannel.channelUriString - to parse.nameResolver - to use for resolving names.UdpChannel as the result of parsing.InvalidChannelException - if an error occurs.public static UdpChannel parse(String channelUriString, NameResolver nameResolver, boolean isDestination)
UdpChannel.channelUriString - to parse.nameResolver - to use for resolving names.isDestination - to identify if it is a destination within a channel.UdpChannel as the result of parsing.InvalidChannelException - if an error occurs.public static int parseBufferLength(ChannelUri channelUri, String paramName)
SystemUtil.parseSize(String, String), clamping the range to 0 <= x <= Integer.MAX_VALUE.channelUri - to get the value from.paramName - key for the parameter.SystemUtil.parseSize(String, String)public static ControlMode parseControlMode(ChannelUri channelUri)
ControlMode.NONE will
be used.channelUri - to parse the control mode from.public static String canonicalise(String localParamValue, InetSocketAddress localData, String remoteParamValue, InetSocketAddress remoteData)
The general format is: UDP-interface:localPort-remoteAddress:remotePort
localParamValue - interface or MDC control param value or null for not set.localData - address/interface for the channel.remoteParamValue - endpoint param value or null if not set.remoteData - address for the channel.public InetSocketAddress remoteData()
public InetSocketAddress localData()
public InetSocketAddress remoteControl()
public InetSocketAddress localControl()
public ChannelUri channelUri()
ChannelUri for this channel.ChannelUri for this channel.public boolean hasMulticastTtl()
multicastTtl() is valid.public int multicastTtl()
public String canonicalForm()
canonicalise(java.lang.String, java.net.InetSocketAddress, java.lang.String, java.net.InetSocketAddress)public String toString()
canonicalForm() for the channel.toString in class ObjectcanonicalForm() for the channel.public boolean isMulticast()
public NetworkInterface localInterface()
NetworkInterface for the local interface used by the channel.public String originalUriString()
public ProtocolFamily protocolFamily()
ProtocolFamily for this channel.ProtocolFamily for this channel.public long tag()
hasTag() is true.public ControlMode controlMode()
public boolean isManualControlMode()
public boolean isDynamicControlMode()
public boolean hasExplicitEndpoint()
public boolean hasExplicitControl()
public boolean hasTag()
tag() is valid.public boolean isMultiDestination()
public int socketRcvbufLength()
public int socketRcvbufLengthOrDefault(int defaultValue)
defaultValue - to be used if the UdpChannel's value is 0 (unspecified).public int socketSndbufLength()
public int socketSndbufLengthOrDefault(int defaultValue)
defaultValue - to be used if the UdpChannel's value is 0 (unspecified).public int receiverWindowLength()
public int receiverWindowLengthOrDefault(int defaultValue)
defaultValue - to be used if the UdpChannel's value is 0 (unspecified).public boolean matchesTag(UdpChannel udpChannel)
udpChannel - to match against.public String description()
public boolean equals(Object o)
canonicalForm() is equal.equals in class Objecto - object to be compared with.canonicalForm() is equal, otherwise false.public int hashCode()
canonicalForm().hashCode in class ObjectcanonicalForm().public static InetSocketAddress destinationAddress(ChannelUri uri, NameResolver nameResolver)
uri - to check.nameResolver - to use for resolution.public static InetSocketAddress resolve(String endpoint, String uriParamName, boolean isReResolution, NameResolver nameResolver)
InetSocketAddress.endpoint - to resolve.uriParamName - for the resolution.isReResolution - for the resolution.nameResolver - to be used for hostname.public int channelReceiveTimestampOffset()
public boolean isChannelReceiveTimestampEnabled()
public boolean isChannelSendTimestampEnabled()
public int channelSendTimestampOffset()
public Long groupTag()
Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.