com.sun.jaw.snmp.agent
Class SnmpMibTable

java.lang.Object
  |
  +--com.sun.jaw.snmp.agent.internal.SnmpMibNode
        |
        +--com.sun.jaw.snmp.agent.SnmpMibTable
Direct Known Subclasses:
SnmpMibTableRemCreate

public abstract class SnmpMibTable
extends com.sun.jaw.snmp.agent.internal.SnmpMibNode
implements java.io.Serializable

The SnmpMibTable is an abtraction for a SNMP table.

See Also:
Serialized Form

Field Summary
protected  int nodeId
          The id of the contained entry object.
protected  SnmpMib theMib
          The mib to which the metadata is linked.
 
Fields inherited from class com.sun.jaw.snmp.agent.internal.SnmpMibNode
noSuchNameException, varList
 
Constructor Summary
SnmpMibTable(SnmpMib theMib)
          Creates a new SnmpMibTable.
 
Method Summary
protected  void addEntry(SnmpIndex index, java.lang.Object entry)
          Adds a new entry in this SnmpMibTable.
 void addSnmpTableEntryListener(SnmpTableEntryListener listener)
          Adds an event listener on the table.
 void check(SnmpValue x, long[] oid, int pos)
          Generic handling of the check operation.
 SnmpValue get(long[] oid, int pos)
          Generic handling of the get operation.
protected  java.lang.Object[] getBasicEntries()
          Gets the entries array of this SnmpMibTable.
protected  java.lang.Object getEntry(SnmpIndex index)
          Gets the entry corresponding to the specified index.
 SnmpVarBind getNext(long[] oid, int pos)
          Generic handling of the getNext operation.
protected  SnmpIndex getNextIndex(SnmpIndex index)
          Gets the index following the specified SnmpIndex in the table.
protected  int getSize()
          Gets the size of the table.
protected  void removeEntry(java.lang.Object entry)
          Removes the specified entry from the table.
 void removeSnmpTableEntryListener(SnmpTableEntryListener listener)
          Removes an event listener from the table.
 SnmpValue set(SnmpValue x, long[] oid, int pos)
          Generic handling of the set operation.
protected  void validateOid(long[] oid, int pos)
          Validates the specified oid.
 
Methods inherited from class com.sun.jaw.snmp.agent.internal.SnmpMibNode
getNextIdentifier, getRootOid, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeId

protected int nodeId
The id of the contained entry object.

theMib

protected SnmpMib theMib
The mib to which the metadata is linked.
Constructor Detail

SnmpMibTable

public SnmpMibTable(SnmpMib theMib)
Creates a new SnmpMibTable.
Parameters:
theMib - The SNMP mib.
Method Detail

addSnmpTableEntryListener

public void addSnmpTableEntryListener(SnmpTableEntryListener listener)
Adds an event listener on the table.
Parameters:
listener - The listener to add.

removeSnmpTableEntryListener

public void removeSnmpTableEntryListener(SnmpTableEntryListener listener)
Removes an event listener from the table.
Parameters:
listener - The listener to be removed.

get

public SnmpValue get(long[] oid,
                     int pos)
              throws SnmpStatusException
Generic handling of the get operation.
Parameters:
oid - The oid array.
pos - The position in the array.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.
Overrides:
get in class com.sun.jaw.snmp.agent.internal.SnmpMibNode

set

public SnmpValue set(SnmpValue x,
                     long[] oid,
                     int pos)
              throws SnmpStatusException
Generic handling of the set operation.
Parameters:
x - The value.
oid - The oid array.
pos - The position in the array.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.
Overrides:
set in class com.sun.jaw.snmp.agent.internal.SnmpMibNode

check

public void check(SnmpValue x,
                  long[] oid,
                  int pos)
           throws SnmpStatusException
Generic handling of the check operation.
Parameters:
x - The value.
oid - The oid array.
pos - The position in the array.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.
Overrides:
check in class com.sun.jaw.snmp.agent.internal.SnmpMibNode

getNext

public SnmpVarBind getNext(long[] oid,
                           int pos)
                    throws SnmpStatusException
Generic handling of the getNext operation.
Parameters:
oid - The oid array.
pos - The position in the array.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.
Overrides:
getNext in class com.sun.jaw.snmp.agent.internal.SnmpMibNode

addEntry

protected void addEntry(SnmpIndex index,
                        java.lang.Object entry)
                 throws SnmpStatusException
Adds a new entry in this SnmpMibTable.
Parameters:
index - The SnmpIndex.
entry - The entry to add.
Throws:
SnmpStatusException - An error occurred while accessing a MIB node.

getEntry

protected java.lang.Object getEntry(SnmpIndex index)
                             throws SnmpStatusException
Gets the entry corresponding to the specified index.
Parameters:
index - The SnmpIndex.
Returns:
The entry.
Throws:
SnmpStatusException - There is no entry with the specified index in the table.

removeEntry

protected void removeEntry(java.lang.Object entry)
Removes the specified entry from the table.
Parameters:
entry - The entry to be removed.

getBasicEntries

protected java.lang.Object[] getBasicEntries()
Gets the entries array of this SnmpMibTable.
Returns:
The entries array.

getNextIndex

protected SnmpIndex getNextIndex(SnmpIndex index)
                          throws SnmpStatusException
Gets the index following the specified SnmpIndex in the table.
Parameters:
index - The SnmpIndex.
Returns:
The next index.
Throws:
SnmpStatusException - There is no index following the specified one in the table.

getSize

protected int getSize()
Gets the size of the table.
Returns:
The size.

validateOid

protected void validateOid(long[] oid,
                           int pos)
                    throws SnmpStatusException
Validates the specified oid.
Parameters:
oid - The oid array.
pos - The position in the array.
Throws:
SnmpStatusException - If the validation fails.