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:
-
Field Summary
Fields inherited from class org.snmp4j.smi.AbstractVariable
SMISYNTAXES_PROPERTIES -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty UnixDomainAddress instance.UnixDomainAddress(UnixDomainSocketAddress unixDomainAddress) Creates a UnixDomainAddress instance from a given Unix domain socket address.UnixDomainAddress(Path unixDomainAddress) Creates a UnixDomainAddress instance from a given Unix domain socket path. -
Method Summary
Modifier and TypeMethodDescriptionclone()intcompareTo(org.snmp4j.smi.Variable variable) voiddecodeBER(org.snmp4j.asn1.BERInputStream berInputStream) voidencodeBER(OutputStream outputStream) booleanvoidfromSubIndex(org.snmp4j.smi.OID oid, boolean b) intgetPath()Retrieves the Unix domain socket path.intRetrieves the Unix domain socket address.inthashCode()booleanisValid()booleanvoidsetValue(byte[] bytes) voidbyte[]inttoInt()longtoLong()toString()org.snmp4j.smi.OIDtoSubIndex(boolean impliedLength) Methods inherited from class org.snmp4j.smi.AbstractVariable
createFromBER, createFromSyntax, equal, getBERPayloadLength, getSyntaxFromString, getSyntaxFromStringOrNull, getSyntaxString, getSyntaxString, isDynamic, isExceptionMethods inherited from interface org.snmp4j.smi.Address
isTransportCompatible
-
Constructor Details
-
UnixDomainAddress
public UnixDomainAddress()Creates an empty UnixDomainAddress instance. -
UnixDomainAddress
Creates a UnixDomainAddress instance from a given Unix domain socket path.- Parameters:
unixDomainAddress- the Unix domain socket path.
-
UnixDomainAddress
Creates a UnixDomainAddress instance from a given Unix domain socket address.- Parameters:
unixDomainAddress- the Unix domain socket address.
-
-
Method Details
-
getUnixDomainAddress
Retrieves the Unix domain socket address.- Returns:
- the Unix domain socket address.
-
equals
- Specified by:
equalsin interfaceorg.snmp4j.smi.Variable- Specified by:
equalsin classorg.snmp4j.smi.AbstractVariable
-
compareTo
public int compareTo(org.snmp4j.smi.Variable variable) - Specified by:
compareToin interfaceComparable<org.snmp4j.smi.Variable>- Specified by:
compareToin interfaceorg.snmp4j.smi.Variable- Specified by:
compareToin classorg.snmp4j.smi.AbstractVariable
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceorg.snmp4j.smi.Variable- Specified by:
hashCodein classorg.snmp4j.smi.AbstractVariable
-
getBERLength
public int getBERLength()- Specified by:
getBERLengthin interfaceorg.snmp4j.asn1.BERSerializable- Specified by:
getBERLengthin classorg.snmp4j.smi.AbstractVariable
-
decodeBER
- Specified by:
decodeBERin interfaceorg.snmp4j.asn1.BERSerializable- Specified by:
decodeBERin classorg.snmp4j.smi.AbstractVariable- Throws:
IOException
-
encodeBER
- Specified by:
encodeBERin interfaceorg.snmp4j.asn1.BERSerializable- Specified by:
encodeBERin classorg.snmp4j.smi.AbstractVariable- Throws:
IOException
-
getSyntax
public int getSyntax()- Specified by:
getSyntaxin interfaceorg.snmp4j.smi.Variable- Specified by:
getSyntaxin classorg.snmp4j.smi.AbstractVariable
-
toString
- Specified by:
toStringin interfaceorg.snmp4j.smi.Variable- Specified by:
toStringin classorg.snmp4j.smi.AbstractVariable
-
toInt
public int toInt()- Specified by:
toIntin interfaceorg.snmp4j.smi.Variable- Specified by:
toIntin classorg.snmp4j.smi.AbstractVariable
-
toLong
public long toLong()- Specified by:
toLongin interfaceorg.snmp4j.smi.Variable- Specified by:
toLongin classorg.snmp4j.smi.AbstractVariable
-
clone
- Specified by:
clonein interfaceorg.snmp4j.smi.Variable- Specified by:
clonein classorg.snmp4j.smi.AbstractVariable
-
toSubIndex
public org.snmp4j.smi.OID toSubIndex(boolean impliedLength) - Specified by:
toSubIndexin interfaceorg.snmp4j.smi.Variable- Specified by:
toSubIndexin classorg.snmp4j.smi.AbstractVariable
-
fromSubIndex
public void fromSubIndex(org.snmp4j.smi.OID oid, boolean b) - Specified by:
fromSubIndexin interfaceorg.snmp4j.smi.Variable- Specified by:
fromSubIndexin classorg.snmp4j.smi.AbstractVariable
-
isValid
public boolean isValid() -
parseAddress
-
setValue
-
setValue
public void setValue(byte[] bytes) -
toByteArray
public byte[] toByteArray() -
getPath
-
getFamily
-
getSocketAddress
-