|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.management.snmp.SnmpVarBind
com.sun.management.snmp in
preference to classes in this package. This class may be removed
in a future version of Java DMK.
This class holds information for a MIB variable contained in an SnmpVarBindList.
An SnmpVarBind consists of three parts:
SnmpVarBind which specifies whether the agent responded with an
exception condition for this variable such as noSuchInstance, endOfMibView,
or noSuchObject.
On the manager side, these errors can be fixed with the
PduFixedOnError option
and the request is retried by removing the variable from the request variable bindings list.
| Field Summary | |
static SnmpNull |
endOfMibView
Deprecated. Error code value as defined in RFC 1448 for: endOfMibView. |
static SnmpNull |
noSuchInstance
Deprecated. Error code value as defined in RFC 1448 for: noSuchInstance. |
static SnmpNull |
noSuchObject
Deprecated. Error code value as defined in RFC 1448 for: noSuchObject. |
SnmpOid |
oid
Deprecated. As of Java Dynamic Management Kit 5.0, use instead getOid and setOid |
int |
status
Deprecated. Indicates the status of the value in this SnmpVarBind. |
static String[] |
statusLegend
Deprecated. Keeps the legend for the value part of the SnmpVarBind. |
static int |
stValueEndOfMibView
Deprecated. Useful constant indicating that the status of the SnmpVarBind object is endOfMibView. |
static int |
stValueNoSuchInstance
Deprecated. Useful constant indicating that the status of the SnmpVarBind object is
noSuchInstance. |
static int |
stValueNoSuchObject
Deprecated. Useful constant indicating that the status of the SnmpVarBind object is noSuchObject. |
static int |
stValueOk
Deprecated. Useful constant indicating that the status of the SnmpVarBind object is valid. |
static int |
stValueUnspecified
Deprecated. Useful constant indicating that the status of the SnmpVarBind object is not initialized. |
SnmpValue |
value
Deprecated. As of Java Dynamic Management Kit 5.0, use instead getSnmpValue and setSnmpValue |
| Fields inherited from interface javax.management.snmp.SnmpDataTypeEnums |
ApplFlag, BitStringTag, BooleanTag, Counter64Tag, CounterTag, CtxtFlag, errEndOfMibViewTag, errNoSuchInstanceTag, errNoSuchObjectTag, GaugeTag, IntegerTag, IpAddressTag, NsapTag, NullTag, ObjectIdentiferTag, OctetStringTag, OpaqueTag, SequenceTag, TableTag, TimeticksTag, UintegerTag, UnknownSyntaxTag |
| Constructor Summary | |
SnmpVarBind()
Deprecated. Default constructor. |
|
SnmpVarBind(SnmpOid oid)
Deprecated. Constructs a new SnmpVarBind object from the specified SnmpOid value. |
|
SnmpVarBind(SnmpOid oid,
SnmpValue val)
Deprecated. Constructs a new SnmpVarBind object from the specified SnmpOid and
SnmpValue. |
|
SnmpVarBind(String name)
Deprecated. Constructs a new SnmpVarBind object from the specified String value. |
|
| Method Summary | |
void |
addInstance(long inst)
Deprecated. Adds an instance part to the OID in the SnmpOid object. |
void |
addInstance(long[] inst)
Deprecated. Adds an instance part to the OID in the SnmpOid object. |
void |
addInstance(String inst)
Deprecated. Adds an instance part to the OID in the SnmpOid object. |
void |
appendInOid(SnmpOid oid)
Deprecated. Appends the specified SnmpOid to the end of the OID of this SnmpVarBind. |
void |
clearValue()
Deprecated. Clears the value associated with this SnmpVarBind and sets the status to
stValueUnspecified. |
Object |
clone()
Deprecated. Clones the SNMP variable (including value). |
Object |
cloneWithoutValue()
Deprecated. Clones the SNMP variable. |
void |
copyValue(SnmpVarBind var)
Deprecated. Clones and copies only the value part from another SnmpVarBind object. |
void |
copyValueAndOid(SnmpVarBind var)
Deprecated. Clones and copies the OID and value part from another SnmpVarBind object. |
SnmpOid |
getOid()
Deprecated. Returns the complete OID part associated with this SnmpVarBind. |
SnmpCounter64 |
getSnmpCounter64Value()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpCounter |
getSnmpCounterValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpGauge |
getSnmpGaugeValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpInt |
getSnmpIntValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpIpAddress |
getSnmpIpAddressValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpOid |
getSnmpOidValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpOpaque |
getSnmpOpaqueValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpStringFixed |
getSnmpStringFixedValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpString |
getSnmpStringValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpTimeticks |
getSnmpTimeticksValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
SnmpValue |
getSnmpValue()
Deprecated. Returns the value part associated with this SnmpVarBind. |
String |
getStringValue()
Deprecated. Returns the printable ASCII representation for the corresponding variable value. |
int |
getValueStatus()
Deprecated. Returns the status of the value associated with this SnmpVarBind as an integer. |
String |
getValueStatusLegend()
Deprecated. Returns the status of the value associated with this SnmpVarBind as a String. |
boolean |
hasVarBindException()
Deprecated. Determines whether the SnmpVarBind has an SNMP exception
(generated by agent in response to a request). |
void |
insertInOid(int oid)
Deprecated. Inserts a sub-id at the beginning of the OID of this SnmpVarBind. |
boolean |
isOidEqual(SnmpVarBind var)
Deprecated. Checks whether the OID for this variable completely matches the OID part of the specified SnmpVarBind object. |
boolean |
isUnspecifiedValue()
Deprecated. Checks whether the value associated with this SnmpVarBind is unspecified. |
boolean |
isValidValue()
Deprecated. Checks whether the object contains a valid accessible value. |
SnmpOidRecord |
resolveVarName(String name)
Deprecated. Consults the MIB table storage to resolve the name to its OID type structure. |
void |
setOid(SnmpOid oid)
Deprecated. Sets the SnmpOid part associated with this SnmpVarBind with the specified OID. |
void |
setSnmpCounter64Value(long val)
Deprecated. Sets the SnmpCounter64 value part associated with this SnmpVarBind
with the specified counter 64 value. |
void |
setSnmpCounter64Value(UnsignedLong val)
Deprecated. Sets the SnmpCounter64 value part associated with this SnmpVarBind
with the specified counter 64 value. |
void |
setSnmpCounterValue(long val)
Deprecated. Sets the SnmpCounter value part associated with this SnmpVarBind
with the specified counter value. |
void |
setSnmpGaugeValue(long val)
Deprecated. Sets the SnmpGauge value part associated with this SnmpVarBind
with the specified gauge value. |
void |
setSnmpIntValue(long val)
Deprecated. Sets the SnmpInt value part associated with this SnmpVarBind
with the specified integer value. |
void |
setSnmpIpAddressValue(String val)
Deprecated. Sets the SnmpIpAddress value part associated with this SnmpVarBind
with the specified ipAddress value. |
void |
setSnmpOidValue(String val)
Deprecated. Sets the SnmpOid value part associated with this SnmpVarBind
with the specified OID value. |
void |
setSnmpOpaqueValue(byte[] val)
Deprecated. Sets the SnmpOpaque value part associated with this SnmpVarBind
with the specified bytes array values. |
void |
setSnmpStringFixedValue(String val)
Deprecated. Sets the SnmpStringFixed value part associated with this SnmpVarBind
with the specified string value. |
void |
setSnmpStringValue(String val)
Deprecated. Sets the SnmpString value part associated with this SnmpVarBind
with the specified string value. |
void |
setSnmpTimeticksValue(long val)
Deprecated. Sets the SnmpTimeticks value part associated with this SnmpVarBind
with the specified timeticks value. |
void |
setSnmpValue(SnmpValue val)
Deprecated. Sets the SnmpValue part associated with this SnmpVarBind with the specified value. |
String |
toString()
Deprecated. Returns the printable ASCII representation of this SnmpVarBind. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String[] statusLegend
SnmpVarBind.
public static final int stValueUnspecified
SnmpVarBind object is not initialized.
public static final int stValueOk
SnmpVarBind object is valid.
public static final int stValueNoSuchObject
SnmpVarBind object is noSuchObject.
Status of SnmpVarBind as returned by the SNMPv2 agent.
public static final int stValueNoSuchInstance
SnmpVarBind object is
noSuchInstance.
Status of SnmpVarBind as returned by the SNMPv2 agent.
In the SNMPv1 context, this is appropriate when noSuchName is returned in response to the
SnmpGet request.
public static final int stValueEndOfMibView
SnmpVarBind object is endOfMibView.
Status of SnmpVarBind as returned by the SNMPv2 agent.
In the SNMPv1 context, this is appropriate when noSuchName is returned in response to the
SnmpGetNext request.
public static final SnmpNull noSuchObject
noSuchObject.
public static final SnmpNull noSuchInstance
noSuchInstance.
public static final SnmpNull endOfMibView
endOfMibView.
public SnmpOid oid
getOid and setOid
SnmpVarBind.
The default value is null.
public SnmpValue value
getSnmpValue and setSnmpValue
SnmpVarBind.
The default value is null.
public int status
SnmpVarBind.
The default value is stValueUnspecified.
This attribute is updated internally and should not be changed otherwise.
| Constructor Detail |
public SnmpVarBind()
public SnmpVarBind(SnmpOid oid)
SnmpVarBind object from the specified SnmpOid value.
oid - The OID part of the SnmpVarBind.
public SnmpVarBind(SnmpOid oid,
SnmpValue val)
SnmpVarBind object from the specified SnmpOid and
SnmpValue.
oid - The OID part of the SnmpVarBind.val - The value part of the SnmpVarBind.
public SnmpVarBind(String name)
throws SnmpStatusException
SnmpVarBind object from the specified String value.
If the name is a MIB variable, it resolves the name with the MIB database.
name - The MIB variable name or a dot-formatted OID String.
SnmpStatusException - An error occurred while resolving the MIB variable name.| Method Detail |
public final SnmpOid getOid()
SnmpVarBind.
SnmpOid for this variable.public final void setOid(SnmpOid oid)
SnmpOid part associated with this SnmpVarBind with the specified OID.
The value part of this SnmpVarBind will automatically be nulled.
oid - The new OID.public final SnmpValue getSnmpValue()
SnmpVarBind.
SnmpValue for this variable.public final void setSnmpValue(SnmpValue val)
SnmpValue part associated with this SnmpVarBind with the specified value.
The status is updated to indicate that the value is valid.
val - The new value.
public final SnmpCounter64 getSnmpCounter64Value()
throws ClassCastException
SnmpVarBind.
SnmpCounter64 value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpCounter64Value(long val)
throws IllegalArgumentException
SnmpCounter64 value part associated with this SnmpVarBind
with the specified counter 64 value.
The status is updated to indicate that the value is valid.
val - The new counter 64 value.
IllegalArgumentException - The specified value is negative or larger than Long.MAX_VALUE.SnmpCounter64
public final void setSnmpCounter64Value(UnsignedLong val)
throws IllegalArgumentException
SnmpCounter64 value part associated with this SnmpVarBind
with the specified counter 64 value.
The status is updated to indicate that the value is valid.
val - The new counter 64 value.
IllegalArgumentException - The specified value is larger than Long.MAX_VALUE.SnmpCounter64
public final SnmpInt getSnmpIntValue()
throws ClassCastException
SnmpVarBind.
SnmpInt value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpIntValue(long val)
throws IllegalArgumentException
SnmpInt value part associated with this SnmpVarBind
with the specified integer value.
The status is updated to indicate that the value is valid.
val - The new integer value.
IllegalArgumentException - The specified value is smaller than Integer.MIN_VALUE
or larger than Integer.MAX_VALUE.SnmpInt
public final SnmpCounter getSnmpCounterValue()
throws ClassCastException
SnmpVarBind.
SnmpCounter value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpCounterValue(long val)
throws IllegalArgumentException
SnmpCounter value part associated with this SnmpVarBind
with the specified counter value.
The status is updated to indicate that the value is valid.
val - The new counter value.
IllegalArgumentException - The specified value is negative or larger than
SnmpUnsignedInt.MAX_VALUE.SnmpCounter
public final SnmpGauge getSnmpGaugeValue()
throws ClassCastException
SnmpVarBind.
SnmpGauge value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpGaugeValue(long val)
throws IllegalArgumentException
SnmpGauge value part associated with this SnmpVarBind
with the specified gauge value.
The status is updated to indicate that the value is valid.
val - The new gauge value.
IllegalArgumentException - The specified value is negative or larger than
SnmpUnsignedInt.MAX_VALUE.SnmpGauge
public final SnmpTimeticks getSnmpTimeticksValue()
throws ClassCastException
SnmpVarBind.
SnmpTimeticks value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpTimeticksValue(long val)
throws IllegalArgumentException
SnmpTimeticks value part associated with this SnmpVarBind
with the specified timeticks value.
The status is updated to indicate that the value is valid.
val - The new timeticks value.
IllegalArgumentException - The specified value is negative or larger than
SnmpUnsignedInt.MAX_VALUE.SnmpTimeticks
public final SnmpOid getSnmpOidValue()
throws ClassCastException
SnmpVarBind.
SnmpOid value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpOidValue(String val)
throws IllegalArgumentException
SnmpOid value part associated with this SnmpVarBind
with the specified OID value.
The status is updated to indicate that the value is valid.
val - The new OID value.
IllegalArgumentException - The specified value is neither a numeric String
nor a String of the MIB database.SnmpOid
public final SnmpIpAddress getSnmpIpAddressValue()
throws ClassCastException
SnmpVarBind.
SnmpIpAddress value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.
public final void setSnmpIpAddressValue(String val)
throws IllegalArgumentException
SnmpIpAddress value part associated with this SnmpVarBind
with the specified ipAddress value.
The status is updated to indicate that the value is valid.
val - The new IP address value.
IllegalArgumentException - The specified value does not correspond to an IP address.SnmpIpAddress
public final SnmpString getSnmpStringValue()
throws ClassCastException
SnmpVarBind.
SnmpString value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.public final void setSnmpStringValue(String val)
SnmpString value part associated with this SnmpVarBind
with the specified string value.
The status is updated to indicate that the value is valid.
val - The new string value.SnmpString
public final SnmpOpaque getSnmpOpaqueValue()
throws ClassCastException
SnmpVarBind.
SnmpOpaque value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.public final void setSnmpOpaqueValue(byte[] val)
SnmpOpaque value part associated with this SnmpVarBind
with the specified bytes array values.
The status is updated to indicate that the value is valid.
val - The new bytes array value.SnmpOpaque
public final SnmpStringFixed getSnmpStringFixedValue()
throws ClassCastException
SnmpVarBind.
SnmpStringFixed value for this variable.
ClassCastException - An attempt has been made to cast an object to a subclass of which
it is not an instance.public final void setSnmpStringFixedValue(String val)
SnmpStringFixed value part associated with this SnmpVarBind
with the specified string value.
The status is updated to indicate that the value is valid.
val - The new string value.SnmpStringFixed
public SnmpOidRecord resolveVarName(String name)
throws SnmpStatusException
name - The MIB variable name or a dot-formatted OID String.
SnmpOidRecord object containing information on the MIB variable.
SnmpStatusException - An error occurred while resolving the MIB variable name.public final int getValueStatus()
SnmpVarBind as an integer.
This value is one of stValueUnspecified, stValueOk, stValueNoSuchObject,
stValueNoSuchInstance, stValueEndOfMibView.
public final String getValueStatusLegend()
SnmpVarBind as a String.
This value is a displayable representation of the status integer value.
It is one of Value not initialized, Valid Value, No such object,
No such Instance, End of Mib View.
public final boolean isValidValue()
true if the associated value is valid, false otherwise.public final boolean isUnspecifiedValue()
SnmpVarBind is unspecified.
true if the status is unspecified, false otherwise.public final void clearValue()
SnmpVarBind and sets the status to
stValueUnspecified.
public final boolean isOidEqual(SnmpVarBind var)
SnmpVarBind object.
var - The object whose OID part is to be matched.
true if the OID part matches exactly, false otherwise.public final void addInstance(long inst)
SnmpOid object.
Note that there is no getInstance method.
This method will directly add the instance to the SnmpOid object.
inst - The sub-identifier to be appended to the OID.
public final void addInstance(long[] inst)
throws SnmpStatusException
SnmpOid object.
Note that there is no getInstance method.
This method will directly add the instance to the SnmpOid object.
inst - The sub-identifier array to be appended to the OID.
SnmpStatusException - An error occurred while accessing a MIB node.
public final void addInstance(String inst)
throws SnmpStatusException
SnmpOid object.
Note that there is no getInstance method.
This method will directly add the instance to the SnmpOid object.
inst - Dot-formatted sub-identifier String to be appended to the OID.
SnmpStatusException - An error occurred while accessing a MIB node.public void insertInOid(int oid)
SnmpVarBind.
oid - The sub-id to insert.public void appendInOid(SnmpOid oid)
SnmpOid to the end of the OID of this SnmpVarBind.
oid - The OID to append.public final boolean hasVarBindException()
SnmpVarBind has an SNMP exception
(generated by agent in response to a request).
true if the SnmpVarBind has an SNMP response exception,
false otherwise.public void copyValueAndOid(SnmpVarBind var)
SnmpVarBind object.
var - The SnmpVarBind clone.public void copyValue(SnmpVarBind var)
SnmpVarBind object.
var - The SnmpVarBind clone.public Object cloneWithoutValue()
public Object clone()
public final String getStringValue()
public final String toString()
SnmpVarBind.
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||