|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.smi.VariableBinding
public class VariableBinding
A VariableBinding is an association of a object instance
identifier (OID) and the instance's value (Variable).
| Constructor Summary | |
|---|---|
VariableBinding()
Creates a variable binding with a zero length OID and a Null value. |
|
VariableBinding(OID oid)
Creates a variable binding with the supplied object instance identifier and a Null value. |
|
VariableBinding(OID oid,
Variable variable)
Creates a variable binding with the supplied OID and value. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
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 BERSerializable object
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). |
OID |
getOid()
Gets the object instance identifier of the variable binding. |
int |
getSyntax()
Gets the syntax of the variable bindings value. |
Variable |
getVariable()
Gets the value of the variable binding. |
int |
hashCode()
|
boolean |
isException()
Returns whether the variable bindings value has an exception syntax. |
void |
setOid(OID oid)
Sets the object instance identifier for the variable binding. |
void |
setVariable(Variable variable)
Sets the value of the variable binding. |
java.lang.String |
toString()
Gets a string representation of this variable binding using the VariableTextFormat configured by SNMP4JSettings. |
java.lang.String |
toValueString()
Gets a string representation of this variable binding's value using the VariableTextFormat configured by SNMP4JSettings. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VariableBinding()
Null value.
public VariableBinding(OID oid)
Null value.
oid - the OID for the new variable binding.
public VariableBinding(OID oid,
Variable variable)
oid - the OID for the new variable binding (must not be null).variable - the value for the new variable binding (must not be null).| Method Detail |
|---|
public OID getOid()
OID.public void setOid(OID oid)
oid - an OID (must not be null) that is cloned when added to
this binding.public void setVariable(Variable variable)
variable - a Variable (must not be null) that is cloned
when added to this binding.public Variable getVariable()
Variable instance.public final int getSyntax()
SMIConstants).public boolean isException()
true if the syntax of this variable is an instance of
Null and its syntax equals one of the following:
Variablepublic final int getBERPayloadLength()
BERSerializableBERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER).
getBERPayloadLength in interface BERSerializablepublic final int getBERLength()
BERSerializableBERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER).
getBERLength in interface BERSerializable
public final void decodeBER(BERInputStream inputStream)
throws java.io.IOException
BERSerializableVariable from an InputStream.
decodeBER in interface BERSerializableinputStream - an InputStream containing a BER encoded byte stream.
java.io.IOException - if the stream could not be decoded by using BER rules.
public final void encodeBER(java.io.OutputStream outputStream)
throws java.io.IOException
BERSerializableVariable to an OutputStream.
encodeBER in interface BERSerializableoutputStream - an OutputStream.
java.io.IOException - if an error occurs while writing to the stream.public java.lang.String toString()
VariableTextFormat configured by SNMP4JSettings.
toString in class java.lang.Object<OID> = <Variable>.public java.lang.String toValueString()
VariableTextFormat configured by SNMP4JSettings.
<Variable>.public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
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 | ||||||||