com.adventnet.utils.jmx
Interface JmxTableModelListener

All Known Implementing Classes:
SNMPEnableTable, JMXSnmpProxyModelMBean, Tl1UserSecurityTable, Tl1OperationSecurityTable, Tl1ChannelSecurityTable, Tl1ResourceSecurityTable, Tl1CommandSecurityTable

public interface JmxTableModelListener

This interface is used for handling tables in JMX when user needs the * choice of handling the table entries rather than the JMX agent holding them in memory. This imparts an efficiency to the Table Handling in JMX agent as the storage can be any other form and the data is fetched only at the runtime. Users who have huge chunks of Data or like to have a Database storage can use this interface for maximum efficiency.


Method Summary
 void addRow(java.lang.Object[] indexObjects, CompositeData entry)
          When the manager is trying to add a row in the table, this method will be called.
 void deleteRow(java.lang.Object[] indexObjects)
          When the manager is trying to delete a row in the table, this method will be called.
 java.util.List getEntries(int startIndex, int endIndex)
          This method gives an List of the CompositeData instances in this table starting from the startIndex through till the EndIndex.
 CompositeData getEntry(java.lang.Object[] indexObjects)
          To get the entry for the given row (identified by the instance)
 CompositeData getFirstEntry()
          To get the first entry in the table
 CompositeData getNextEntry(java.lang.Object[] indexObjects)
          To get the next entry for the given row (identified by the instance)
 void modifyRow(java.lang.Object[] indexObjects, CompositeData entry)
          When the manager is trying to modify a row in the table, this method will be called.
 int totalRows()
          This method gives the total number of rows in the table.
 

Method Detail

getEntry

public CompositeData getEntry(java.lang.Object[] indexObjects)
To get the entry for the given row (identified by the instance)
Parameters:
indexObjects - the object array with index objects which identifies the row
Returns:
instance of javax.jmx.openmbean.CompositeData with the entry information. Otherwise null.

getNextEntry

public CompositeData getNextEntry(java.lang.Object[] indexObjects)
To get the next entry for the given row (identified by the instance)
Parameters:
indexObjects - the object array with index objects which identifies the row
Returns:
instance of javax.jmx.openmbean.CompositeData with the entry information. Otherwise null.

getFirstEntry

public CompositeData getFirstEntry()
To get the first entry in the table
Returns:
instance of javax.jmx.openmbean.CompositeData with the entry information. Otherwise null.

addRow

public void addRow(java.lang.Object[] indexObjects,
                   CompositeData entry)
            throws java.lang.Exception
When the manager is trying to add a row in the table, this method will be called.
Parameters:
indexObjects - the object array with index objects which identifies the row to be added.
entry - the entry value as javax.jmx.openmbean.CompositeData instance.

deleteRow

public void deleteRow(java.lang.Object[] indexObjects)
               throws java.lang.Exception
When the manager is trying to delete a row in the table, this method will be called.
Parameters:
indexObjects - the object array with index objects which identifies the row to be deleted.
entry - the entry value as javax.jmx.openmbean.CompositeData instance.

modifyRow

public void modifyRow(java.lang.Object[] indexObjects,
                      CompositeData entry)
               throws java.lang.Exception
When the manager is trying to modify a row in the table, this method will be called.
Parameters:
indexObjects - the object array with index objects which identifies the row to be modified.
entry - the entry value as javax.jmx.openmbean.CompositeData instance.

totalRows

public int totalRows()
This method gives the total number of rows in the table. This method will be used by the HTML and TL1 adaptors. Users who wish to have only Snmp interface need not implement this method.
Returns:
int specifying the number of rows in the Table.

getEntries

public java.util.List getEntries(int startIndex,
                                 int endIndex)
This method gives an List of the CompositeData instances in this table starting from the startIndex through till the EndIndex. This method will be used by the HTML and TL1 adaptors. Users who wish to have only Snmp interface need not implement this method. For example: If the 1st 5 rows have to be retrieved, then the start index will be 1 and the end index will be 5.
Returns:
List of the instances of the CompositeData.