All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Snmp.SnmpOID

java.lang.Object
   |
   +----Snmp.SnmpVar
           |
           +----Snmp.SnmpOID

public class SnmpOID
extends SnmpVar
Class of SNMP Object ID - Sub-class of SnmpVar. This is the important Object ID class. Used widely to create and interpret Object IDs, use them in SNMP PDUs to get/set data, and relate SNMP variables to MIB data. Includes methods for printing, converting, and associating MIB nodes


Variable Index

 o byteValue
 o node
The MIB node corresponding to the OID - automatically populated by only some of the constructors
 o value

Constructor Index

 o SnmpOID(String)
Requires the argument to be a String OID of the form .N.N.N, or N.N.N in which case the static Standard_Prefix in the SnmpAPI class is used.
 o SnmpOID(String, MibModule)
Requires the first argument to be an OID of the form .N.N.N..., or N.N.N..., in which case the static Standard_Prefix in the SnmpAPI class is used.
 o SnmpOID(String, SnmpAPI)
Requires the first argument to be an OID of the form .N.N.N..., or N.N.N..., in which case the static Standard_Prefix in the SnmpAPI class is used.

Method Index

 o getNearestNode(SnmpAPI)
This does a search of all MIB modules in SnmpAPI specified and fills in the Nearest MibNode for this SnmpOID instance if found.
 o getNode(MibModule)
This does a search of the MIB module specified and fills in the MibNode for this SnmpOID instance if found
 o getNode(SnmpAPI)
This does a search of all MIB modules in SnmpAPI specified and fills in the MibNode for this SnmpOID instance if found
 o nodeLabel()
To get the name (label) of the MIB node this OID corresponds to.
 o toBytes()
To return the value as raw bytes
 o toShortString()
To convert the object to a short string label.instance if the appropriate MIB is loaded.
 o toString()
To convert the object to a printable string used in printing If node is not null, i.e.
 o toTagString()
To convert the object to a printable string tagged with Object ID:
 o toValue()
Function to return Object ID value as an array of longs

Variables

 o value
 protected long value[]
 o byteValue
 protected byte byteValue[]
 o node
 public MibNode node
The MIB node corresponding to the OID - automatically populated by only some of the constructors

Constructors

 o SnmpOID
 public SnmpOID(String s)
Requires the argument to be a String OID of the form .N.N.N, or N.N.N in which case the static Standard_Prefix in the SnmpAPI class is used. This constructor requires N be a number, not a name. In this case an explicit call to the getNode method is needed to populate the (MibNode) node

 o SnmpOID
 public SnmpOID(String s,
                SnmpAPI api)
Requires the first argument to be an OID of the form .N.N.N..., or N.N.N..., in which case the static Standard_Prefix in the SnmpAPI class is used. N can be a number or a name. This does the search of MIB modules of the SnmpAPI specified and fills in the MibNode for the SnmpOID instance. Also supports simple "label" or "label.N" strings to create OIDs, where label is the label of a node in the MIB tree (and is a leaf node in the latter case).

 o SnmpOID
 public SnmpOID(String s,
                MibModule module)
Requires the first argument to be an OID of the form .N.N.N..., or N.N.N..., in which case the static Standard_Prefix in the SnmpAPI class is used. N can be a number or a name. This does search the MIB module specified and fills in the MibNode for this SnmpOID instance if found Also supports simple "label" or "label.N" strings to create OIDs, where label is the label of a node in the MIB tree (and is a leaf node in the latter case).

Methods

 o getNode
 public MibNode getNode(SnmpAPI api)
This does a search of all MIB modules in SnmpAPI specified and fills in the MibNode for this SnmpOID instance if found

 o getNode
 public MibNode getNode(MibModule module)
This does a search of the MIB module specified and fills in the MibNode for this SnmpOID instance if found

 o getNearestNode
 public MibNode getNearestNode(SnmpAPI api)
This does a search of all MIB modules in SnmpAPI specified and fills in the Nearest MibNode for this SnmpOID instance if found. The mib node need not be a leaf node

 o toValue
 public Object toValue()
Function to return Object ID value as an array of longs

Overrides:
toValue in class SnmpVar
 o toBytes
 public byte[] toBytes()
To return the value as raw bytes

Overrides:
toBytes in class SnmpVar
 o nodeLabel
 public String nodeLabel()
To get the name (label) of the MIB node this OID corresponds to. If node is not null, i.e. node has been populated, the label will be returned, else null will be returned.

 o toString
 public String toString()
To convert the object to a printable string used in printing If node is not null, i.e. node has been populated, the names will be returned

Overrides:
toString in class SnmpVar
 o toTagString
 public String toTagString()
To convert the object to a printable string tagged with Object ID:

Overrides:
toTagString in class SnmpVar
 o toShortString
 public String toShortString()
To convert the object to a short string label.instance if the appropriate MIB is loaded. Otherwise return the numeric .N.N...


All Packages  Class Hierarchy  This Package  Previous  Next  Index