|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The SnmpTable RMI interface handles polling for SNMP tables for RMI clients.
See the rmitable.java application example in the rmiclient directory for an example. You will find it very useful to get familiar with the com.adventnet.snmp.beans package before using the RMI APIs, since the RMI APIs mirror and are derived from the beans equivalents.
| Field Summary | |
static int |
SNMP_VARIABLE_BINDING_DATA
Constant to specify format of returned table SNMP data values |
static int |
SNMP_VARIABLE_DATA
Constant to specify format of returned table SNMP data values |
static int |
STRING_DATA
Constant to specify format of returned table SNMP data values. |
| Fields inherited from interface com.adventnet.snmp.rmi.SnmpTarget |
AUTH_NO_PRIV, AUTH_PRIV, CBC_3DES, CBC_DES, CFB_AES_128, CFB_AES_192, CFB_AES_256, MD5_AUTH, NO_AUTH, NO_AUTH_NO_PRIV, NO_PRIV, SHA_AUTH, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, SNMPTRAP, SNMPV2TRAP, VERSION1, VERSION2C, VERSION3 |
| Method Summary | |
void |
addRow(boolean Status,
java.lang.String[] oidlist,
java.lang.String[] s)
add a row to the table . |
void |
addSnmpTableListener(SnmpTableListener l)
Add a listener to the list that's notified each time a change to the SNMP Table occurs. |
void |
deleteRow(java.lang.String oid)
Delete the row from the table |
java.lang.Object |
getCellValue(java.lang.String tableOID,
int rowIndex,
int columnIndex)
To get the value at the cell specified by the row and column index. |
java.lang.String[] |
getColumn(int columnIndex)
To get a column of the Table,corresponding to the specified index |
java.lang.String[] |
getColumn(java.lang.String columnName)
To get a specified column of the Table |
java.lang.Class |
getColumnClass(int columnIndex)
Returns the class to be used as renderer and editor for the column. |
int |
getColumnCount()
Returns the number of columns of data available in the SnmpTable |
MibNode |
getColumnMibNode(int columnIndex)
Get MibNode corresponding to a table column |
java.lang.String |
getColumnName(int index)
Returns the name of the column index. |
int |
getDataType()
Get the data type to be returned by the getValue methods. |
java.lang.String[][] |
getIndices()
To get the indices of the Table. |
java.lang.String[][] |
getNotAccessibleIndex()
To get the values for the not-accessible indices. |
java.lang.String[] |
getNotAccessibleIndexColumns()
To get the names of the not-accessible index columns. |
boolean |
getPerformSets()
Are sets being done when a user changes an editable field. |
void |
getPerformSets(boolean allowSets)
Activate/Deactivate sets when a user changes an editable field. |
int |
getPollInterval()
Get the current polling interval in seconds |
boolean |
getRetrievalMode()
returns the mode of retrieval.For getting the values of the table, the bean will use successive getnext by default. |
java.lang.String[] |
getRow(java.lang.String tableOID,
java.lang.String index)
To get the row of the Table,corresponding to the specified index of the row in the table. |
int |
getRowCount()
Returns the number of rows of data available in the SnmpTable. |
java.lang.String |
getTableOID()
Get table oid used with this SnmpTable instance. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns value for the cell at specified index. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns true if the cell at specified index is editable. |
void |
refreshTable()
To refresh the table datas |
void |
removeSnmpTableListener(SnmpTableListener l)
Remove a listener from the list that's notified each time a change to the SNMP Table occurs. |
void |
setCellValue(java.lang.String tableOID,
java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets the value at specified index. |
void |
setColumnsPolled(java.util.Vector index)
To set the columns that needs to be polled. |
void |
setDataType(int type)
Set the data type to be returned by the getValue methods. |
void |
setObjectIDList(java.lang.String[] s)
Method to set the column names of the table that needs to be polled. |
void |
setParams(java.lang.String host,
java.lang.String mib,
java.lang.String tableOID)
To set TargetHost,MibModule and TableOID |
void |
setPollInterval(int i)
Set the polling interval in seconds |
void |
setRetrievalMode(boolean mode)
To set the mode of retrieval. |
void |
setTableOID(java.lang.String tableOID)
Specify table to be used with this SnmpTable instance. |
void |
setTableOIDWoStart(java.lang.String tableOID)
To set the table OID without starting polling |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets the value at specified index. |
void |
startPollingTable()
Method to start the polling of Table.This can be used after setting the table column oids using setObjectIDList.If the method setTableOID is used to set the oid of the table,this method need not be called explicitly as the setTableOID() method calls this method internally. |
| Field Detail |
public static final int STRING_DATA
public static final int SNMP_VARIABLE_DATA
public static final int SNMP_VARIABLE_BINDING_DATA
| Method Detail |
public java.lang.String[][] getNotAccessibleIndex()
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.String[] getNotAccessibleIndexColumns()
throws java.rmi.RemoteException
java.rmi.RemoteException
public int getRowCount()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setCellValue(java.lang.String tableOID,
java.lang.Object aValue,
int rowIndex,
int columnIndex)
throws java.rmi.RemoteException
tableOID - OID of the table to which the cell belongs.aValue - the value that needs to be set.rowIndex - index of the rowcolumnIndex - index of the column
java.rmi.RemoteExceptionErrorMessages,
SnmpTarget.getErrorCode(),
SnmpTarget.getErrorString()
public java.lang.Object getCellValue(java.lang.String tableOID,
int rowIndex,
int columnIndex)
throws java.rmi.RemoteException
tableOID - OID of the table to which the cell belongs.rowIndex - row to which the cell belongs.columnIndex - column to which the cell belongs.
java.rmi.RemoteException
public java.lang.String[] getRow(java.lang.String tableOID,
java.lang.String index)
throws java.rmi.RemoteException
index - index of the row in the table.
java.rmi.RemoteException
public java.lang.String[] getColumn(int columnIndex)
throws java.rmi.RemoteException
columnIndex - index of the column
java.rmi.RemoteException
public java.lang.String[] getColumn(java.lang.String columnName)
throws java.rmi.RemoteException
columnName - name of the column
java.rmi.RemoteException
public void setParams(java.lang.String host,
java.lang.String mib,
java.lang.String tableOID)
throws java.rmi.RemoteException
host - target hostmib - mib filetableOID - OID of the table
java.rmi.RemoteException
public void setTableOIDWoStart(java.lang.String tableOID)
throws java.rmi.RemoteException,
DataException
tableOID - OID of the table as a String
DataException
java.rmi.RemoteException
public void startPollingTable()
throws java.rmi.RemoteException,
DataException
java.rmi.RemoteException
DataException
public java.lang.String[][] getIndices()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void addRow(boolean Status,
java.lang.String[] oidlist,
java.lang.String[] s)
throws java.rmi.RemoteException,
DataException
Status - if boolean is true then EntryStatus otherwise RowStatusoidlist - list of Object ids of the table columns.s - values to be set in the row.
DataException - is thrown on errors
java.rmi.RemoteException
public void deleteRow(java.lang.String oid)
throws java.rmi.RemoteException
oid - rowStatus.index
java.rmi.RemoteException
public int getColumnCount()
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.String getColumnName(int index)
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.Class getColumnClass(int columnIndex)
throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean isCellEditable(int rowIndex,
int columnIndex)
throws java.rmi.RemoteException
java.rmi.RemoteException
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
throws java.rmi.RemoteException
java.rmi.RemoteException
public void addSnmpTableListener(SnmpTableListener l)
throws java.rmi.RemoteException
l - the SnmpTableListener
java.rmi.RemoteException
public void removeSnmpTableListener(SnmpTableListener l)
throws java.rmi.RemoteException
l - the SnmpTableListener
java.rmi.RemoteException
public java.lang.String getTableOID()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setTableOID(java.lang.String tableOID)
throws java.rmi.RemoteException
tableOID - the Object ID of the table, e.g. ifTable
java.rmi.RemoteException
public int getDataType()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setDataType(int type)
throws java.rmi.RemoteException
type - data type to be returned
java.rmi.RemoteException
public void setColumnsPolled(java.util.Vector index)
throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean getRetrievalMode()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setRetrievalMode(boolean mode)
throws java.rmi.RemoteException
java.rmi.RemoteException
public int getPollInterval()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setPollInterval(int i)
throws java.rmi.RemoteException
java.rmi.RemoteException
public void refreshTable()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void setObjectIDList(java.lang.String[] s)
throws java.rmi.RemoteException
setObjectIDList in interface SnmpTargets - a one dimensional array of column names
java.rmi.RemoteException
public MibNode getColumnMibNode(int columnIndex)
throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean getPerformSets()
throws java.rmi.RemoteException
java.rmi.RemoteException
public void getPerformSets(boolean allowSets)
throws java.rmi.RemoteException
java.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||