Module org.snmp4j

Class UdpAddress

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Variable>, BERSerializable, Address, AssignableFromByteArray, AssignableFromString, Variable
Direct Known Subclasses:
DtlsAddress

public class UdpAddress extends TransportIpAddress
The UdpAddress represents UDP/IP transport addresses.
Version:
3.0
Author:
Frank Fock
See Also:
  • Constructor Details

    • UdpAddress

      public UdpAddress()
      Creates an empty UdpAddress without IpAddress.getInetAddress() and zero port.
    • UdpAddress

      public UdpAddress(InetAddress inetAddress, int port)
      Create a UdpAddress from the given InetAddress 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, a RuntimeException is thrown.
      Parameters:
      port - the UDP port.
    • UdpAddress

      public UdpAddress(String address)
  • Method Details

    • parse

      public static Address parse(String address)
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface Variable
      Overrides:
      equals in class TransportIpAddress
    • clone

      public Object clone()
      Description copied from interface: Variable
      Clones 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.
      Specified by:
      clone in interface Variable
      Overrides:
      clone in class IpAddress
      Returns:
      a new instance of this Variable with the same value.