- 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:
java.lang.Cloneable
,java.lang.Comparable<Variable>
,BERSerializable
,Address
,AssignableFromByteArray
,AssignableFromString
,Variable
- Direct Known Subclasses:
DtlsAddress
public class UdpAddress extends TransportIpAddress
TheUdpAddress
represents UDP/IP transport addresses.- Version:
- 3.0
- Author:
- Frank Fock
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.snmp4j.smi.AbstractVariable
SMISYNTAXES_PROPERTIES
-
Fields inherited from class org.snmp4j.smi.IpAddress
ANY_IPADDRESS
-
Fields inherited from class org.snmp4j.smi.TransportIpAddress
port
-
-
Constructor Summary
Constructors Constructor Description UdpAddress()
Creates 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(java.lang.String address)
UdpAddress(java.net.InetAddress inetAddress, int port)
Create a UdpAddress from the givenInetAddress
and port.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static Address
parse(java.lang.String address)
-
Methods inherited from class org.snmp4j.smi.AbstractVariable
createFromBER, createFromSyntax, equal, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException
-
Methods inherited from interface org.snmp4j.smi.Address
isTransportCompatible
-
Methods inherited from class org.snmp4j.smi.IpAddress
clone, fromSubIndex, getInetAddress, setAddress, setInetAddress, setValue, setValue, toByteArray, toInt, toLong, toSubIndex
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class org.snmp4j.smi.TransportIpAddress
compareTo, decodeBER, encodeBER, getBERLength, getBERPayloadLength, getPort, getSyntax, getValue, hashCode, isValid, parseAddress, setPort, setTransportAddress, toString
-
-
-
-
Constructor Detail
-
UdpAddress
public UdpAddress()
Creates an empty UdpAddress withoutIpAddress.getInetAddress()
and zero port.
-
UdpAddress
public UdpAddress(java.net.InetAddress inetAddress, int port)
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
public UdpAddress(java.lang.String address)
-
-
Method Detail
-
parse
public static Address parse(java.lang.String address)
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfaceVariable
- Overrides:
equals
in classTransportIpAddress
-
-