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 org.snmp4j.smi.TransportIpAddress
port
Fields inherited from class org.snmp4j.smi.IpAddress
ANY_IPADDRESS
Fields inherited from class org.snmp4j.smi.AbstractVariable
SMISYNTAXES_PROPERTIES
-
Constructor Summary
ConstructorDescriptionCreates 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 givenInetAddress
and port. -
Method Summary
Methods inherited from class org.snmp4j.smi.TransportIpAddress
compareTo, decodeBER, encodeBER, getBERLength, getBERPayloadLength, getPort, getSyntax, getValue, hashCode, isValid, parseAddress, setPort, setTransportAddress, toString
Methods inherited from class org.snmp4j.smi.IpAddress
clone, fromSubIndex, getFamily, getInetAddress, getSocketAddress, setAddress, setInetAddress, setValue, setValue, toByteArray, toInt, toLong, toSubIndex
Methods inherited from class org.snmp4j.smi.AbstractVariable
createFromBER, createFromSyntax, equal, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.snmp4j.smi.Address
isTransportCompatible
-
Constructor Details
-
UdpAddress
public UdpAddress()Creates an empty UdpAddress withoutIpAddress.getInetAddress()
and zero port. -
UdpAddress
Create a UdpAddress from the givenInetAddress
and 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, aRuntimeException
is thrown.- Parameters:
port
- the UDP port.
-
UdpAddress
-
-
Method Details
-
parse
-
equals
- Specified by:
equals
in interfaceVariable
- Overrides:
equals
in classTransportIpAddress
-