|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.management.snmp.agent.SnmpMibNode
public abstract class SnmpMibNode
The SnmpMibNode
class represents a node in an SNMP MIB.
This class is used internally and by the class generated by
mibgen
.
You should not need to use this class directly.
Field Summary | |
---|---|
protected static SnmpStatusException |
noSuchInstanceException
Contains a predefined exception that is often fired when an object is not found in the MIB. |
protected static SnmpStatusException |
noSuchNameException
|
protected static SnmpStatusException |
noSuchObjectException
|
protected int[] |
varList
Contains the list of variable identifiers. |
Constructor Summary | |
---|---|
SnmpMibNode()
|
Method Summary | |
---|---|
abstract void |
check(SnmpMibSubRequest req,
int depth)
Generic handling of the check operation. |
abstract void |
get(SnmpMibSubRequest req,
int depth)
Generic handling of the get operation. |
protected static int |
getNextIdentifier(int[] table,
long value)
This will give the first element greater than value
in a sorted array. |
long |
getNextVarId(long id,
Object userData)
Get the next OID arc corresponding to a readable scalar variable, a branch leading to a subgroup, or a table. |
long |
getNextVarId(long id,
Object userData,
int pduVersion)
Get the next OID arc corresponding to a readable scalar variable, a branch leading to a subgroup, or a table, possibly skipping over those arcs that must not or cannot be returned. |
void |
getRootOid(Vector result)
Computes the root OID of the MIB. |
abstract void |
set(SnmpMibSubRequest req,
int depth)
Generic handling of the set operation. |
protected boolean |
skipVariable(long id,
Object userData,
int pduVersion)
Hook for subclasses. |
static void |
sort(int[] array)
Sorts the specified integer array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] varList
protected static final SnmpStatusException noSuchInstanceException
protected static final SnmpStatusException noSuchObjectException
protected static final SnmpStatusException noSuchNameException
Constructor Detail |
---|
public SnmpMibNode()
Method Detail |
---|
public long getNextVarId(long id, Object userData) throws SnmpStatusException
id
- Id we start from looking for the next.userData
- A contextual object containing user-data.
This object is allocated through the
SnmpUserDataFactory
for each incoming SNMP request.
SnmpStatusException
- If no id is found after the given id.public long getNextVarId(long id, Object userData, int pduVersion) throws SnmpStatusException
getNextVarId(long,java.lang.Object)
until
skipVariable(long,java.lang.Object,int)
returns false.
id
- Id we start from looking for the next.userData
- A contextual object containing user-data.
This object is allocated through the
SnmpUserDataFactory
for each incoming SNMP request.pduVersion
- Protocol version of the original request PDU.
SnmpStatusException
- If no id is found after the given id.protected boolean skipVariable(long id, Object userData, int pduVersion)
id
- Id we start from looking for the next.userData
- A contextual object containing user-data.
This object is allocated through the
SnmpUserDataFactory
for each incoming SNMP request.pduVersion
- Protocol version of the original request PDU.
public abstract void get(SnmpMibSubRequest req, int depth) throws SnmpStatusException
get
operation.
You can override this method if you need to implement some specific policies for minimizing the accesses made to some remote underlying resources.
req
- The sub-request that must be handled by this node.depth
- The depth reached in the OID tree.
SnmpStatusException
- An error occurred while accessing
the MIB node.public abstract void set(SnmpMibSubRequest req, int depth) throws SnmpStatusException
set
operation.
You can override this method if you need to implement some specific policies for minimizing the accesses made to some remote underlying resources.
req
- The sub-request that must be handled by this node.depth
- The depth reached in the OID tree.
SnmpStatusException
- An error occurred while accessing
the MIB node.public abstract void check(SnmpMibSubRequest req, int depth) throws SnmpStatusException
check
operation.
You can override this method if you need to implement some specific policies for minimizing the accesses made to some remote underlying resources, or if you need to implement some consistency checks between the different values provided in the varbind list.
req
- The sub-request that must be handled by this node.depth
- The depth reached in the OID tree.
SnmpStatusException
- An error occurred while accessing
the MIB node.public static void sort(int[] array)
array
- An integer array.public void getRootOid(Vector result)
protected static final int getNextIdentifier(int[] table, long value) throws SnmpStatusException
value
in a sorted array.
If there is no element of the array greater than value
,
the method will throw a SnmpStatusException
.
table
- A sorted integer array.value
- The greatest value.
SnmpStatusException
- If there is no element greater than
value
.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |