public class MBeanAttributeMOTableSupport extends AbstractMBeanSupport implements JMXTableSupport
MBeanAttributeMOTableSupport maps SNMP conceptual tables
(MOTable) to MBean attributes and vice versa.oid2MBeanMap, server| Constructor and Description |
|---|
MBeanAttributeMOTableSupport(MBeanServerConnection server) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.snmp4j.smi.OID tableOID,
MBeanAttributeMOTableInfo mBeanInfo)
Adds a table to MBean attributes mapping.
|
void |
addAll(Object[][] tableDescriptions)
Adds a list of table to MBean attributes mappings.
|
org.snmp4j.smi.OID |
getLastIndex(org.snmp4j.smi.OID tableOID)
Gets the last SNMP index currently supported by the specified table.
|
int |
getRow(org.snmp4j.smi.OID tableOID,
org.snmp4j.agent.mo.MOTableRow row)
Gets the row values for the specified row.
|
int |
getRowCount(org.snmp4j.smi.OID tableOID)
Returns the number of rows of the specified table.
|
boolean |
isEmpty(org.snmp4j.smi.OID tableOID)
Checks if the table is empty or not.
|
org.snmp4j.smi.OID |
mapToIndex(org.snmp4j.smi.OID tableOID,
Object nativeRowId,
int nativeIndex)
Maps a native MBean row identifier object or index to a SNMP table index
OID.
|
Object |
mapToRowId(org.snmp4j.smi.OID tableOID,
org.snmp4j.smi.OID rowIndex)
Maps a SNMP row index to a native row identifier object.
|
Iterator |
rowIdIterator(org.snmp4j.smi.OID tableOID)
Returns an Iterator over the row identifiers of the table.
|
Iterator |
rowIdTailIterator(org.snmp4j.smi.OID tableOID,
Object firstRowId)
Returns a tail iterator over the row identifiers of the table.
|
int |
setRow(org.snmp4j.smi.OID tableOID,
org.snmp4j.agent.mo.MOTableRow row,
int column)
Sets the value of a column (cell) of a row from the corresponding SNMP
conceptual row.
|
getMBeanMOInfo, removeMBeanpublic MBeanAttributeMOTableSupport(MBeanServerConnection server)
public void add(org.snmp4j.smi.OID tableOID,
MBeanAttributeMOTableInfo mBeanInfo)
tableOID - the entry OID of the table (including the .1).mBeanInfo - a MBeanAttributeMOTableInfo instance describing the
actual mapping.public void addAll(Object[][] tableDescriptions)
tableDescriptions - an two dimensional array of table descriptions. Each description
contains two elements:
OID of the table entry (thus including the .1),MBeanAttributeMOTableInfo instance.public org.snmp4j.smi.OID getLastIndex(org.snmp4j.smi.OID tableOID)
JMXTableSupportgetLastIndex in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.public int getRow(org.snmp4j.smi.OID tableOID,
org.snmp4j.agent.mo.MOTableRow row)
JMXTableSupportgetRow in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.row - a MOTableRow instance which will be modified to hold the
SNMP values of the row specified by row's index value.public int setRow(org.snmp4j.smi.OID tableOID,
org.snmp4j.agent.mo.MOTableRow row,
int column)
JMXTableSupportsetRow in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.row - a MOTableRow instance that identifies the target row by its
row index (indirectly) and that contains the SNMP values that replace
the corresponding native values.column - the zero-based column index to set.public boolean isEmpty(org.snmp4j.smi.OID tableOID)
JMXTableSupportisEmpty in interface JMXTableSupporttrue if the table is empty (has no rows), false/code> otherwise.public int getRowCount(org.snmp4j.smi.OID tableOID)
JMXTableSupportgetRowCount in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.public Iterator rowIdIterator(org.snmp4j.smi.OID tableOID)
JMXTableSupportrowIdIterator in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.public org.snmp4j.smi.OID mapToIndex(org.snmp4j.smi.OID tableOID,
Object nativeRowId,
int nativeIndex)
JMXTableSupportmapToIndex in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.nativeRowId - the native row ID object which identifies the row. If null
then nativeIndex identifies the row.nativeIndex - the native enumerating index if rows are not identified by an object.public Object mapToRowId(org.snmp4j.smi.OID tableOID, org.snmp4j.smi.OID rowIndex)
JMXTableSupportmapToRowId in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.rowIndex - a SNMP row index of the table specified by tableOID.public Iterator rowIdTailIterator(org.snmp4j.smi.OID tableOID, Object firstRowId)
JMXTableSupportrowIdTailIterator in interface JMXTableSupporttableOID - the OID of the table ManagedObject (including the .1 of the entry
object) for which indexes are mapped.firstRowId - the lower bound (including) of the row identifiers to return.Copyright © 2015 SNMP4J.org. All rights reserved.