Class UdpAddress
java.lang.Object
org.snmp4j.smi.AbstractVariable
org.snmp4j.smi.SMIAddress
org.snmp4j.smi.IpAddress
org.snmp4j.smi.TransportIpAddress
org.snmp4j.smi.UdpAddress
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<Variable>, BERSerializable, Address, AssignableFromByteArray, AssignableFromString, Variable
- Direct Known Subclasses:
DtlsAddress
The
UdpAddress represents UDP/IP transport addresses.- Version:
- 3.0
- Author:
- Frank Fock
- See Also:
-
Field Summary
Fields inherited from class TransportIpAddress
portFields inherited from class IpAddress
ANY_IPADDRESSFields inherited from class AbstractVariable
SMISYNTAXES_PROPERTIES -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty UdpAddress withoutIpAddress.getInetAddress()and zero port.UdpAddress(int port) Create a UdpAddress for the local host (InetAddress.getLocalHost()with the provided port.UdpAddress(String address) UdpAddress(InetAddress inetAddress, int port) Create a UdpAddress from the givenInetAddressand port. -
Method Summary
Methods inherited from class TransportIpAddress
compareTo, decodeBER, encodeBER, getBERLength, getBERPayloadLength, getPort, getSyntax, getValue, hashCode, isValid, parseAddress, setPort, setTransportAddress, toStringMethods inherited from class IpAddress
fromSubIndex, getFamily, getInetAddress, getSocketAddress, setAddress, setInetAddress, setValue, setValue, toByteArray, toInt, toLong, toSubIndexMethods inherited from class AbstractVariable
createFromBER, createFromSyntax, equal, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isExceptionMethods inherited from interface Address
isTransportCompatible
-
Constructor Details
-
UdpAddress
public UdpAddress()Creates an empty UdpAddress withoutIpAddress.getInetAddress()and zero port. -
UdpAddress
Create a UdpAddress from the givenInetAddressand port.- Parameters:
inetAddress- the IP address portion of the UDP address to create.port- the UDP port.
-
UdpAddress
public UdpAddress(int port) Create a UdpAddress for the local host (InetAddress.getLocalHost()with the provided port. If the local host is not known, aRuntimeExceptionis thrown.- Parameters:
port- the UDP port.
-
UdpAddress
-
-
Method Details
-
parse
-
equals
- Specified by:
equalsin interfaceVariable- Overrides:
equalsin classTransportIpAddress
-
clone
Description copied from interface:VariableClones this variable. Cloning can be used by the SNMP4J API to better support concurrency by creating a clone for internal processing. The content of this object is independent to the content of the clone. Thus, changes to the clone will have no effect to this object.
-