Class UnixDomainAddress

java.lang.Object
org.snmp4j.smi.AbstractVariable
org.snmp4j.smi.SMIAddress
org.snmp4j.transport.unix.UnixDomainAddress
All Implemented Interfaces:
Serializable, Cloneable, Comparable<org.snmp4j.smi.Variable>, org.snmp4j.asn1.BERSerializable, org.snmp4j.smi.Address, org.snmp4j.smi.AssignableFromByteArray, org.snmp4j.smi.AssignableFromString, org.snmp4j.smi.Variable

public class UnixDomainAddress extends org.snmp4j.smi.SMIAddress
Represents an address for communication using Unix domain sockets. This class provides utilities for working with Unix domain socket addresses, such as parsing, validation, and encoding/decoding in BER format. It extends the SMIAddress class, inheriting SNMP-related behaviors while focusing on Unix-specific socket address functionalities.
See Also:
  • Constructor Details

    • UnixDomainAddress

      public UnixDomainAddress()
      Creates an empty UnixDomainAddress instance.
    • UnixDomainAddress

      public UnixDomainAddress(Path unixDomainAddress)
      Creates a UnixDomainAddress instance from a given Unix domain socket path.
      Parameters:
      unixDomainAddress - the Unix domain socket path.
    • UnixDomainAddress

      public UnixDomainAddress(UnixDomainSocketAddress unixDomainAddress)
      Creates a UnixDomainAddress instance from a given Unix domain socket address.
      Parameters:
      unixDomainAddress - the Unix domain socket address.
  • Method Details

    • getUnixDomainAddress

      public UnixDomainSocketAddress getUnixDomainAddress()
      Retrieves the Unix domain socket address.
      Returns:
      the Unix domain socket address.
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface org.snmp4j.smi.Variable
      Specified by:
      equals in class org.snmp4j.smi.AbstractVariable
    • compareTo

      public int compareTo(org.snmp4j.smi.Variable variable)
      Specified by:
      compareTo in interface Comparable<org.snmp4j.smi.Variable>
      Specified by:
      compareTo in interface org.snmp4j.smi.Variable
      Specified by:
      compareTo in class org.snmp4j.smi.AbstractVariable
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface org.snmp4j.smi.Variable
      Specified by:
      hashCode in class org.snmp4j.smi.AbstractVariable
    • getBERLength

      public int getBERLength()
      Specified by:
      getBERLength in interface org.snmp4j.asn1.BERSerializable
      Specified by:
      getBERLength in class org.snmp4j.smi.AbstractVariable
    • decodeBER

      public void decodeBER(org.snmp4j.asn1.BERInputStream berInputStream) throws IOException
      Specified by:
      decodeBER in interface org.snmp4j.asn1.BERSerializable
      Specified by:
      decodeBER in class org.snmp4j.smi.AbstractVariable
      Throws:
      IOException
    • encodeBER

      public void encodeBER(OutputStream outputStream) throws IOException
      Specified by:
      encodeBER in interface org.snmp4j.asn1.BERSerializable
      Specified by:
      encodeBER in class org.snmp4j.smi.AbstractVariable
      Throws:
      IOException
    • getSyntax

      public int getSyntax()
      Specified by:
      getSyntax in interface org.snmp4j.smi.Variable
      Specified by:
      getSyntax in class org.snmp4j.smi.AbstractVariable
    • toString

      public String toString()
      Specified by:
      toString in interface org.snmp4j.smi.Variable
      Specified by:
      toString in class org.snmp4j.smi.AbstractVariable
    • toInt

      public int toInt()
      Specified by:
      toInt in interface org.snmp4j.smi.Variable
      Specified by:
      toInt in class org.snmp4j.smi.AbstractVariable
    • toLong

      public long toLong()
      Specified by:
      toLong in interface org.snmp4j.smi.Variable
      Specified by:
      toLong in class org.snmp4j.smi.AbstractVariable
    • clone

      public Object clone()
      Specified by:
      clone in interface org.snmp4j.smi.Variable
      Specified by:
      clone in class org.snmp4j.smi.AbstractVariable
    • toSubIndex

      public org.snmp4j.smi.OID toSubIndex(boolean impliedLength)
      Specified by:
      toSubIndex in interface org.snmp4j.smi.Variable
      Specified by:
      toSubIndex in class org.snmp4j.smi.AbstractVariable
    • fromSubIndex

      public void fromSubIndex(org.snmp4j.smi.OID oid, boolean b)
      Specified by:
      fromSubIndex in interface org.snmp4j.smi.Variable
      Specified by:
      fromSubIndex in class org.snmp4j.smi.AbstractVariable
    • isValid

      public boolean isValid()
    • parseAddress

      public boolean parseAddress(String s)
    • setValue

      public void setValue(String s)
    • setValue

      public void setValue(byte[] bytes)
    • toByteArray

      public byte[] toByteArray()
    • getPath

      public Path getPath()
      Retrieves the Unix domain socket path.
      Returns:
      the Unix domain socket path.
    • getFamily

      public ProtocolFamily getFamily()
    • getSocketAddress

      public SocketAddress getSocketAddress()