|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.smi.AbstractVariable
org.snmp4j.smi.SMIAddress
org.snmp4j.smi.IpAddress
org.snmp4j.smi.TransportIpAddress
public abstract class TransportIpAddress
The TransportIpAddress is the abstract base class for all
transport addresses on top of IP network addresses.
| Field Summary | |
|---|---|
protected int |
port
|
| Fields inherited from class org.snmp4j.smi.IpAddress |
|---|
ANY_IPADDRESS |
| Fields inherited from class org.snmp4j.smi.AbstractVariable |
|---|
SMISYNTAXES_PROPERTIES |
| Constructor Summary | |
|---|---|
TransportIpAddress()
|
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
|
void |
decodeBER(BERInputStream inputStream)
Decodes a Variable from an InputStream. |
void |
encodeBER(java.io.OutputStream outputStream)
Encodes a Variable to an OutputStream. |
boolean |
equals(java.lang.Object o)
|
int |
getBERLength()
Returns the length of this Variable in bytes when encoded
according to the Basic Encoding Rules (BER). |
int |
getBERPayloadLength()
Returns the length of the payload of this BERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER). |
int |
getPort()
|
int |
getSyntax()
Gets the ASN.1 syntax identifier value of this SNMP variable. |
byte[] |
getValue()
Returns the address value as a byte array. |
int |
hashCode()
|
boolean |
isValid()
Checks whether this Address is a valid transport address. |
static Address |
parse(java.lang.String address)
|
boolean |
parseAddress(java.lang.String address)
Parses the address from the supplied string representation. |
void |
setPort(int port)
|
void |
setTransportAddress(OctetString transportAddress)
Sets this transport address from an OcetString containing the address value in format as specified by the TRANSPORT-ADDRESS-MIB. |
java.lang.String |
toString()
Gets a string representation of the variable. |
| Methods inherited from class org.snmp4j.smi.IpAddress |
|---|
clone, fromSubIndex, getInetAddress, setAddress, setInetAddress, setValue, toInt, toLong, toSubIndex |
| Methods inherited from class org.snmp4j.smi.AbstractVariable |
|---|
createFromBER, createFromSyntax, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int port
| Constructor Detail |
|---|
public TransportIpAddress()
| Method Detail |
|---|
public int getPort()
public void setPort(int port)
public boolean isValid()
AddressAddress is a valid transport address.
isValid in interface AddressisValid in class IpAddresstrue if the address is valid, false otherwise.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in interface VariablecompareTo in class IpAddresspublic boolean equals(java.lang.Object o)
equals in interface Variableequals in class IpAddresspublic boolean parseAddress(java.lang.String address)
Address
parseAddress in interface AddressparseAddress in class IpAddressaddress - a String representation of this address.
true if address could be successfully
parsed and has been assigned to this address object, false
otherwise.public static Address parse(java.lang.String address)
public java.lang.String toString()
AbstractVariable
toString in interface VariabletoString in class IpAddresspublic int hashCode()
hashCode in interface VariablehashCode in class IpAddress
public void setTransportAddress(OctetString transportAddress)
throws java.net.UnknownHostException
transportAddress - an OctetString containing the IP address bytes and the two port bytes
in network byte order.
java.net.UnknownHostException - if the address is invalid.public byte[] getValue()
public void decodeBER(BERInputStream inputStream)
throws java.io.IOException
AbstractVariableVariable from an InputStream.
decodeBER in interface BERSerializabledecodeBER in class IpAddressinputStream - an InputStream containing a BER encoded byte stream.
java.io.IOException - if the stream could not be decoded by using BER rules.
public void encodeBER(java.io.OutputStream outputStream)
throws java.io.IOException
AbstractVariableVariable to an OutputStream.
encodeBER in interface BERSerializableencodeBER in class IpAddressoutputStream - an OutputStream.
java.io.IOException - if an error occurs while writing to the stream.public int getBERLength()
AbstractVariableVariable in bytes when encoded
according to the Basic Encoding Rules (BER).
getBERLength in interface BERSerializablegetBERLength in class IpAddresspublic int getBERPayloadLength()
BERSerializableBERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER).
getBERPayloadLength in interface BERSerializablegetBERPayloadLength in class AbstractVariablepublic int getSyntax()
AbstractVariable
getSyntax in interface VariablegetSyntax in class IpAddress
|
Copyright 2003-2009 Frank Fock and Jochen Katz (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||