com.sun.management.snmp.agent
Class SnmpMibEntry

java.lang.Object
  extended by com.sun.management.snmp.agent.SnmpMibNode
      extended by com.sun.management.snmp.agent.SnmpMibEntry
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UsmUserEntryMeta

public abstract class SnmpMibEntry
extends SnmpMibNode
implements Serializable

Represents a node in an SNMP MIB which corresponds to a table entry meta node.

This class is used by the class generated by mibgen. You should not need to use this class directly.

Since:
Java DMK 5.1
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.management.snmp.agent.SnmpMibNode
noSuchInstanceException, noSuchNameException, noSuchObjectException, varList
 
Constructor Summary
SnmpMibEntry()
           
 
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.
 long getNextVarId(long id, Object userData)
          Get the next OID arc corresponding to a readable scalar variable.
abstract  boolean isReadable(long arc)
          Tells whether the given arc identifies a readable scalar object in this entry.
abstract  boolean isVariable(long arc)
          Tells whether the given arc identifies a variable (scalar object) in this entry.
abstract  void set(SnmpMibSubRequest req, int depth)
          Generic handling of the set operation.
 void validateVarId(long arc, Object userData)
          Checks whether the given OID arc identifies a variable (columnar object).
 
Methods inherited from class com.sun.management.snmp.agent.SnmpMibNode
getNextIdentifier, getNextVarId, getRootOid, skipVariable, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpMibEntry

public SnmpMibEntry()
Method Detail

isVariable

public abstract boolean isVariable(long arc)
Tells whether the given arc identifies a variable (scalar object) in this entry.

Parameters:
arc - An OID arc.
Returns:
true if `arc' leads to a variable.

isReadable

public abstract boolean isReadable(long arc)
Tells whether the given arc identifies a readable scalar object in this entry.

Parameters:
arc - An OID arc.
Returns:
true if `arc' leads to a readable variable.

getNextVarId

public long getNextVarId(long id,
                         Object userData)
                  throws SnmpStatusException
Get the next OID arc corresponding to a readable scalar variable.

Overrides:
getNextVarId in class SnmpMibNode
Parameters:
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.
Returns:
The next id in this group.
Throws:
SnmpStatusException - If no id is found after the given id.

validateVarId

public void validateVarId(long arc,
                          Object userData)
                   throws SnmpStatusException
Checks whether the given OID arc identifies a variable (columnar object).

Parameters:
userData - A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Throws:
If - the given `arc' does not identify any variable in this group, throws an SnmpStatusException.
SnmpStatusException

get

public abstract void get(SnmpMibSubRequest req,
                         int depth)
                  throws SnmpStatusException
Generic handling of the get operation.

The actual implementation of this method will be generated by mibgen. Usually, this implementation only delegates the job to some other provided runtime class, which knows how to access the MBean. The current toolkit thus provides two implementations:

Both implementations rely upon specific - and distinct, set of mibgen generated methods.

You can override this method if you need to implement some specific policies for minimizing the accesses made to some remote underlying resources.

Specified by:
get in class SnmpMibNode
Parameters:
req - The sub-request that must be handled by this node.
depth - The depth reached in the OID tree.
Throws:
SnmpStatusException - An error occurred while accessing the MIB node.

set

public abstract void set(SnmpMibSubRequest req,
                         int depth)
                  throws SnmpStatusException
Generic handling of the set operation.

The actual implementation of this method will be generated by mibgen. Usually, this implementation only delegates the job to some other provided runtime class, which knows how to access the MBean. The current toolkit thus provides two implementations:

Both implementations rely upon specific - and distinct, set of mibgen generated methods.

You can override this method if you need to implement some specific policies for minimizing the accesses made to some remote underlying resources.

Specified by:
set in class SnmpMibNode
Parameters:
req - The sub-request that must be handled by this node.
depth - The depth reached in the OID tree.
Throws:
SnmpStatusException - An error occurred while accessing the MIB node.

check

public abstract void check(SnmpMibSubRequest req,
                           int depth)
                    throws SnmpStatusException
Generic handling of the check operation.

The actual implementation of this method will be generated by mibgen. Usually, this implementation only delegates the job to some other provided runtime class, which knows how to access the MBean. The current toolkit thus provides two implementations:

Both implementations rely upon specific - and distinct, set of mibgen generated methods.

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.

Specified by:
check in class SnmpMibNode
Parameters:
req - The sub-request that must be handled by this node.
depth - The depth reached in the OID tree.
Throws:
SnmpStatusException - An error occurred while accessing the MIB node.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.