|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SnmpTableMBean
The MBean interface of SnmpTable class
Method Summary | |
---|---|
java.util.ArrayList |
addRow(java.util.Collection varbinds)
Adds a new row. |
java.util.ArrayList |
addRow(SnmpTableEntry entry)
Adds a new row. |
java.util.ArrayList |
addRow(SnmpTableEntry entry,
java.lang.String suffix)
Adds a new row. |
java.util.ArrayList |
deleteRow(SnmpTableEntry entry)
Deletes the specified entry |
java.util.ArrayList |
deleteRow(java.lang.String indexSuffix)
Removes the row with the passed indexSuffix |
int |
getColumnCount()
Returns the number of columns in this table |
java.lang.String |
getIndexSuffix(int index)
Returns the index suffix of row at specified index |
SnmpTableEntry |
getNextOID(SnmpOID oid)
Returns null if next OID is out of this table's subtree; Its next oid is in this subtree, it returns an SnmpTableEntry object which contains the next OID (SnmpTableEntry.setOID method must be called, otherwise it may cause exceptions), caller will use SnmpTableEntry.getOID() to retrieve that OID value. |
SnmpTableEntry |
getNextOID(SnmpOID oid,
SnmpPdu pdu)
Returns null if next OID is out of this table's subtree; If the next oid is in this subtree, it returns an SnmpTableEntry object which contains the next OID (SnmpTableEntry.setOID method must be called, otherwise it may cause exceptions), caller will use SnmpTableEntry.getOID() to retrieve that OID value. |
SnmpTableEntry |
getOID(SnmpOID oid)
Returns null if passed oid doesn't exist in this subtree; a non-null object if this oid exists in this subtree. |
SnmpTableEntry |
getOID(SnmpOID oid,
SnmpPdu pdu)
Returns null if passed oid doesn't exist in this subtree; a non-null object if this oid exists in this subtree. |
SnmpTableEntry |
getRow(int index)
Returns row at specified index |
SnmpTableEntry |
getRow(java.lang.String indexSuffix)
Returns row whose index suffix is equal to the passed indexSuffix |
int |
getRowCount()
Returns the number of rows in this table |
java.util.Vector |
getRows()
Returns all rows in a Vector object. |
void |
postAddRow(SnmpTableEntry entry)
Gets called after this row is added |
void |
postDeleteRow(SnmpTableEntry entry)
Gets called after this row is deleted |
void |
postSetValue(SnmpTableEntry entry,
SnmpVarBind newValue,
java.util.Collection varbinds)
Deprecated, use postSetValue instead |
void |
postSetValue(SnmpTableEntry entry,
SnmpVarBind newValue,
SnmpPdu pdu)
Gets called after setting new value to the passed entry object. |
boolean |
preAddRow(SnmpTableEntry entry)
Gets called before this row is added. |
boolean |
preDeleteRow(SnmpTableEntry entry)
Gets called before this row is deleted. |
boolean |
preSetValue(SnmpTableEntry entry,
SnmpVarBind newValue,
java.util.Collection varbinds)
Deprecated, use preSetValue instead |
void |
preSetValue(SnmpTableEntry entry,
SnmpVarBind newValue,
SnmpPdu pdu)
Gets called before setting new value to the passed entry object when agent receives an SNMP SET request. |
Method Detail |
---|
java.util.ArrayList addRow(SnmpTableEntry entry, java.lang.String suffix)
Note: It's not the preferred method for adding rows in most cases. addRow(SnmpTableEntry entry) method should be used instead.
entry
- the new row to be addedsuffix
- the index suffix
addRow(SnmpTableEntry)
java.util.ArrayList addRow(SnmpTableEntry entry)
entry
- the new row to be added
java.util.ArrayList addRow(java.util.Collection varbinds)
varbinds
- an array of SnmpVarBind objects, which contain the name/value of each column.
java.util.ArrayList deleteRow(SnmpTableEntry entry)
java.util.ArrayList deleteRow(java.lang.String indexSuffix)
indexSuffix
indexSuffix
- the index suffix of the row to be removed
java.lang.String getIndexSuffix(int index)
index
- the row index
java.lang.IndexOutOfBoundsException
- if index is out of range (index
< 0 || index >= size()).int getRowCount()
int getColumnCount()
SnmpTableEntry getRow(int index)
index
- the row index
java.lang.IndexOutOfBoundsException
- if index is out of range (index
< 0 || index >= size()).SnmpTableEntry getRow(java.lang.String indexSuffix)
indexSuffix
SnmpTableEntry
object. Or null if nothing found.java.util.Vector getRows()
Vector
object. Each element in the vector
is a SnmpTableEntry
object.
boolean preAddRow(SnmpTableEntry entry)
entry
- an instance of SnmpTableEntry or its sub class
void postAddRow(SnmpTableEntry entry)
entry
- an instance of SnmpTableEntry or its sub classboolean preDeleteRow(SnmpTableEntry entry)
entry
- an instance of SnmpTableEntry or its sub class
void postDeleteRow(SnmpTableEntry entry)
entry
- an instance of SnmpTableEntry or its sub classvoid preSetValue(SnmpTableEntry entry, SnmpVarBind newValue, SnmpPdu pdu)
Because SNMP SET operation is atomic, you may need to override this method in
your table classes which accept SET operations, and check the validity of passed newValue
and the pdu object. If the value is not acceptable, SnmpException
needs to be thrown, so this SET operation fails
and proper error code is returned to SNMP manager.
Note: SNMP version information of the received packet
can be retrieved by calling pdu.getVersion()
entry
- SnmpTableEntry object for the row affected. It is null if this table is self-managed or this
SET request is for creating a new row. For dynamic row creation, the passed entry
is null, overriding
preAddRow(SnmpTableEntry entry)
method to get its valuenewValue
- the new value which is being processedpdu
- PDU object received
SnmpException
- Throw an SnmpException if the passed newValue
is not acceptable, and you
need to set SnmpException object's errorStatus field, which will be used in the response PDU's errorStatus field.boolean preSetValue(SnmpTableEntry entry, SnmpVarBind newValue, java.util.Collection varbinds)
preSetValue
instead
void postSetValue(SnmpTableEntry entry, SnmpVarBind newValue, SnmpPdu pdu)
entry
- SnmpTableEntry object for the row affected. It is null if this table is self-managed or this
SET request is for creating a new row. For dynamic row creation, the passed entry
is null, overriding
postAddRow(SnmpTableEntry entry)
method to get its valuenewValue
- the new value which is being processedpdu
- PDU object receivedvoid postSetValue(SnmpTableEntry entry, SnmpVarBind newValue, java.util.Collection varbinds)
postSetValue
instead
SnmpTableEntry getNextOID(SnmpOID oid, SnmpPdu pdu)
If setProcessSnmpRequestDirectly(true)
is invoked for the table,
this method is required, otherwise this method won't be used.
oid
- oid to be processedpdu
- PDU object receivedSnmpTableEntry getNextOID(SnmpOID oid)
If setProcessSnmpRequestDirectly(true)
is invoked for the table,
this method is required, otherwise this method won't be used.
SnmpTableEntry getOID(SnmpOID oid, SnmpPdu pdu)
If setProcessSnmpRequestDirectly(true)
is invoked for the table,
this method is required, otherwise this method won't be used.
oid
- oid to be processedpdu
- PDU object receivedSnmpTableEntry getOID(SnmpOID oid)
If setProcessSnmpRequestDirectly(true)
is invoked for the table,
this method is required, otherwise this method won't be used.
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |