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
- See Also:
-
Field Summary
FieldsFields inherited from class org.snmp4j.smi.TransportIpAddress
portFields inherited from class org.snmp4j.smi.IpAddress
ANY_IPADDRESSFields inherited from class org.snmp4j.smi.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 org.snmp4j.smi.TransportIpAddress
compareTo, decodeBER, encodeBER, getBERLength, getBERPayloadLength, getPort, getSyntax, getValue, hashCode, isValid, parseAddress, setPort, setTransportAddress, toStringMethods inherited from class org.snmp4j.smi.IpAddress
clone, fromSubIndex, getInetAddress, setAddress, setInetAddress, setValue, setValue, toByteArray, toInt, toLong, toSubIndexMethods inherited from class org.snmp4j.smi.AbstractVariable
createFromBER, createFromSyntax, equal, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isExceptionMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.snmp4j.smi.Address
isTransportCompatible
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
-
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
-