org.snmp4j.agent.mo.jmx.util
Class AbstractSyntheticJMXIndexSupport
java.lang.Object
org.snmp4j.agent.mo.jmx.util.AbstractSyntheticJMXIndexSupport
- All Implemented Interfaces:
- JMXIndexSupport
public abstract class AbstractSyntheticJMXIndexSupport
- extends java.lang.Object
- implements JMXIndexSupport
- Author:
- Frank Fock
|
Method Summary |
protected org.snmp4j.smi.OID |
allocateNewIndex(java.lang.Object rowIdentifier)
|
java.lang.Object |
getRowIdentifier(java.lang.Object nativeRowId,
int nativeRowIndex)
Maps a native object identifying a row or alternatively the row's index
into an internal array (e.g., an array returned by a MBean method). |
org.snmp4j.smi.OID |
mapToIndex(java.lang.Object rowIdentifier)
Maps a row identifier (i.e., an Object returned by
JMXIndexSupport.getRowIdentifier(java.lang.Object, int)) to a row index. |
java.lang.Object |
mapToRowIdentifier(org.snmp4j.smi.OID rowIndex)
Maps a row index OID to an object describing a row index internally. |
abstract javax.management.ObjectName |
mapToRowMBean(java.lang.Object rowIdentifier)
Maps a row identifier to a MBean object name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyIndexRelation
protected KeyIndexRelation keyIndexRelation
AbstractSyntheticJMXIndexSupport
public AbstractSyntheticJMXIndexSupport()
AbstractSyntheticJMXIndexSupport
public AbstractSyntheticJMXIndexSupport(int initialSize)
mapToIndex
public org.snmp4j.smi.OID mapToIndex(java.lang.Object rowIdentifier)
- Description copied from interface:
JMXIndexSupport
- Maps a row identifier (i.e., an Object returned by
JMXIndexSupport.getRowIdentifier(java.lang.Object, int)) to a row index.
- Specified by:
mapToIndex in interface JMXIndexSupport
- Parameters:
rowIdentifier - an Object describing a row index.
- Returns:
- a row index OID.
allocateNewIndex
protected org.snmp4j.smi.OID allocateNewIndex(java.lang.Object rowIdentifier)
mapToRowMBean
public abstract javax.management.ObjectName mapToRowMBean(java.lang.Object rowIdentifier)
- Description copied from interface:
JMXIndexSupport
- Maps a row identifier to a MBean object name. If a row cannot be accessed
directly via an index, for example, because the rows are mapped from
a list or array, then
null is returned.
- Specified by:
mapToRowMBean in interface JMXIndexSupport
- Parameters:
rowIdentifier - the row identifier which may be also a native index value into an
array or list of MBean attribute values.
- Returns:
- ObjectName
the object name of the MBean representing the row identified by
rowIdentifier. If rowIdentifier is a
Integer and null is returned, the caller
should use the rowIdentifier value as index into the value list.
mapToRowIdentifier
public java.lang.Object mapToRowIdentifier(org.snmp4j.smi.OID rowIndex)
- Description copied from interface:
JMXIndexSupport
- Maps a row index OID to an object describing a row index internally.
- Specified by:
mapToRowIdentifier in interface JMXIndexSupport
- Parameters:
rowIndex - a row index OID.
- Returns:
- an Object describing a row index.
getRowIdentifier
public java.lang.Object getRowIdentifier(java.lang.Object nativeRowId,
int nativeRowIndex)
- Description copied from interface:
JMXIndexSupport
- Maps a native object identifying a row or alternatively the row's index
into an internal array (e.g., an array returned by a MBean method).
- Specified by:
getRowIdentifier in interface JMXIndexSupport
- Parameters:
nativeRowId - an Object identifying a row.nativeRowIndex - optionally the index of the row into an internal array.
- Returns:
- a key Object that can be directly mapped to a row index OID.