com.sun.jdmk.snmp.agent
Class SnmpMibNode

java.lang.Object
  extended bycom.sun.jdmk.snmp.agent.SnmpMibNode
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SnmpMibEntry, SnmpMibOid, SnmpMibTable

Deprecated. Use package com.sun.management.snmp.agent in preference to classes in this package. This class may be removed in a future version of Java DMK.

public abstract class SnmpMibNode
extends Object
implements Serializable

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.

Version:
4.19 04/22/04
Author:
Sun Microsystems, Inc
See Also:
Serialized Form

Field Summary
protected static SnmpStatusException noSuchInstanceException
          Deprecated. Contains a predefined exception that is often fired when an object is not found in the MIB.
protected static SnmpStatusException noSuchNameException
          Deprecated.  
protected static SnmpStatusException noSuchObjectException
          Deprecated.  
protected  int[] varList
          Deprecated. Contains the list of variable identifiers.
 
Constructor Summary
SnmpMibNode()
          Deprecated.  
 
Method Summary
abstract  void check(SnmpMibSubRequest req, int depth)
          Deprecated. Generic handling of the check operation.
abstract  void get(SnmpMibSubRequest req, int depth)
          Deprecated. Generic handling of the get operation.
protected static int getNextIdentifier(int[] table, long value)
          Deprecated. This will give the first element greater than value in a sorted array.
 long getNextVarId(long id, Object userData)
          Deprecated. 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)
          Deprecated. 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)
          Deprecated. Computes the root OID of the MIB.
abstract  void set(SnmpMibSubRequest req, int depth)
          Deprecated. Generic handling of the set operation.
protected  boolean skipVariable(long id, Object userData, int pduVersion)
          Deprecated. Hook for subclasses.
static void sort(int[] array)
          Deprecated. 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

varList

protected int[] varList
Deprecated. 
Contains the list of variable identifiers.


noSuchInstanceException

protected static final SnmpStatusException noSuchInstanceException
Deprecated. 
Contains a predefined exception that is often fired when an object is not found in the MIB.


noSuchObjectException

protected static final SnmpStatusException noSuchObjectException
Deprecated. 

noSuchNameException

protected static final SnmpStatusException noSuchNameException
Deprecated. 
Constructor Detail

SnmpMibNode

public SnmpMibNode()
Deprecated. 
Method Detail

getNextVarId

public long getNextVarId(long id,
                         Object userData)
                  throws SnmpStatusException
Deprecated. 
Get the next OID arc corresponding to a readable scalar variable, a branch leading to a subgroup, or a table.

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.

getNextVarId

public long getNextVarId(long id,
                         Object userData,
                         int pduVersion)
                  throws SnmpStatusException
Deprecated. 
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. Calls getNextVarId(long,java.lang.Object) until skipVariable(long,java.lang.Object,int) returns false.

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.
pduVersion - Protocol version of the original request PDU.
Returns:
The next id in this group which can be returned using the given PDU's protocol version.
Throws:
SnmpStatusException - If no id is found after the given id.

skipVariable

protected boolean skipVariable(long id,
                               Object userData,
                               int pduVersion)
Deprecated. 
Hook for subclasses. The default implementation of this method is to always return false. Subclasses should redefine this method so that it returns true when:

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.
pduVersion - Protocol version of the original request PDU.
Returns:
true if the variable must be skipped by the get-next algorithm.

get

public abstract void get(SnmpMibSubRequest req,
                         int depth)
                  throws SnmpStatusException
Deprecated. 
Generic handling of the 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.

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
Deprecated. 
Generic handling of the 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.

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
Deprecated. 
Generic handling of the 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.

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.

sort

public static void sort(int[] array)
Deprecated. 
Sorts the specified integer array.

Parameters:
array - An integer array.

getRootOid

public void getRootOid(Vector result)
Deprecated. 
Computes the root OID of the MIB.


getNextIdentifier

protected static final int getNextIdentifier(int[] table,
                                             long value)
                                      throws SnmpStatusException
Deprecated. 
This will give the first element greater than value in a sorted array. If there is no element of the array greater than value, the method will throw a SnmpStatusException.

Parameters:
table - A sorted integer array.
value - The greatest value.
Throws:
SnmpStatusException - If there is no element greater than value.

FCS Release
jdmk-5_1-b34.1 2005.02.10_16:46:09_MET

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