com.adventnet.snmp.beans
Class SnmpAugmentTable

java.lang.Object
  |
  +--com.adventnet.snmp.beans.SnmpServer
        |
        +--com.adventnet.snmp.beans.SnmpTarget
              |
              +--com.adventnet.snmp.beans.SnmpTable
                    |
                    +--com.adventnet.snmp.beans.SnmpAugmentTable
All Implemented Interfaces:
CustomizerTemplate, java.util.EventListener, java.lang.Runnable, java.io.Serializable, java.beans.VetoableChangeListener

public class SnmpAugmentTable
extends SnmpTable

The SnmpAugmentTable class is an extension of SnmpTable and this class provide some additional supports like
Augment Table
External Indices and
NotAccessible Indices .

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTable
SNMP_VARIABLE_BINDING_DATA, SNMP_VARIABLE_DATA, STRING_DATA
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTarget
serialize, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, SNMPTRAP, SNMPV2TRAP, VERSION1, VERSION2C, VERSION3
 
Fields inherited from class com.adventnet.snmp.beans.SnmpServer
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, oidList, SHA_AUTH
 
Constructor Summary
SnmpAugmentTable()
          Use this constructor for applications.
SnmpAugmentTable(java.applet.Applet applet)
          Use this constructor for applets.
SnmpAugmentTable(int protocol, ProtocolOptions options)
          Use this constructor for applications which uses protocols other than UDP/IP.
SnmpAugmentTable(int port, java.lang.String session)
          Use this constructor for creating a new session for this application.
SnmpAugmentTable(SnmpSession ses, MibOperations mib)
          This constructor is used to create an SnmpAugmentTable instance with a specified SnmpSession and MibOperations.
 
Method Summary
 java.lang.Object getCellValue(java.lang.String tableOID, int rowIndex, int columnIndex)
          To get the value for the cell specified by the row and column index.
 java.lang.String[] getRow(java.lang.String tableOID, java.lang.String index)
          Returns the data for a row of the Table specified by the index .
 void refreshTable()
          Refreshes the table data.
 void setAllParams(java.lang.String host, java.lang.String mib, java.lang.String tableOID)
          To set multiple parameters like TargetHost,MibModule and TableOID.
 void setCellValue(java.lang.String tableOID, java.lang.Object aValue, int rowIndex, int columnIndex)
          Sets the value for the cell specified by the row and column index.
 void setOIDList(java.lang.String[] s)
          Sets the column names of the table that needs to be polled.
 void setTableObjectID(java.lang.String tableOID)
          Sets the table OID to be used with this SnmpAugmentTable instance.
 void setTableObjectIDWoStart(java.lang.String tableOID)
          To set the table OID without starting polling.
 
Methods inherited from class com.adventnet.snmp.beans.SnmpTable
addRow, addSnmpTableListener, checkDifferences, compareRow, deleteRow, deleteTableRow, finalize, genTableEvent, getColumn, getColumn, getColumnClass, getColumnCount, getColumnMibNode, getColumnName, getDataType, getHoles, getIndices, getNotAccessibleIndex, getNotAccessibleIndexColumns, getPerformSets, getPerformSets, getPollInterval, getRetrievalMode, getRow, getRowCount, getTableOID, getValueAt, isCellEditable, removeSnmpTableListener, run, setColumnsPolled, setDataType, setObjectIDList, setParams, setPollInterval, setRetrievalMode, setTableOID, setTableOIDWoStart, setValueAt, showErrorMessage, startPollingTable, stopPollingTable
 
Methods inherited from class com.adventnet.snmp.beans.SnmpTarget
addLogClient, addLogClient, addObjectID, addResultListener, addSnmpOID, addSnmpPropertyListener, addUserError, addV3HandShakeResultListener, enableDebugForPDU, genEvent, genTimeoutEvent, getAttemptComplete, getAttemptPartial, getAuthPassword, getAuthProtocol, getCommunity, getCompleteResponse, getContextID, getContextName, getDebug, getEngineID, getErrorCode, getErrorCodes, getErrorIndex, getErrorString, getExceptionCode, getExceptionCodes, getIgnoreSpecificControlCodes, getMaxNumRows, getMaxRepetitions, getMibModules, getMibOperations, getNonRepeaters, getObjectID, getObjectID, getObjectIDList, getPduErrorIndex, getPrincipal, getPrivPassword, getPrivProtocol, getRetries, getSecurityLevel, getSecurityModel, getSendTimeoutEvents, getSnmpOID, getSnmpOIDList, getSnmpVersion, getTargetHost, getTargetPort, getTimeout, getUserErrorCode, getUserErrorString, getVarBindCount, getWriteCommunity, isInSubTree, isSerialize, loadMibs, releaseResources, removeLogClient, removeResultListener, removeSnmpPropertyListener, removeV3HandShakeListener, setAttemptComplete, setAttemptPartial, setAuthPassword, setAuthProtocol, setClientID, setCommunity, setContextID, setContextName, setDebug, setEngineID, setIgnoreSpecificControlCodes, setMaxNumRows, setMaxRepetitions, setMibModules, setNonRepeaters, setObjectID, setObjectID, setParams, setParams, setPrincipal, setPrivPassword, setPrivProtocol, setRetries, setSecurityLevel, setSecurityModel, setSendTimeoutEvents, setSnmpOID, setSnmpOIDList, setSnmpVersion, setTargetHost, setTargetPort, setTimeout, setVarBindCount, setWriteCommunity, snmpGet, snmpGet, snmpGetAllList, snmpGetAllVariableBindings, snmpGetAllVariables, snmpGetBulkList, snmpGetBulkVariableBindings, snmpGetBulkVariables, snmpGetList, snmpGetList, snmpGetNext, snmpGetNext, snmpGetNextList, snmpGetNextList, snmpGetNextVariable, snmpGetNextVariableBinding, snmpGetNextVariableBindings, snmpGetNextVariables, snmpGetVariable, snmpGetVariableBinding, snmpGetVariableBindings, snmpGetVariables, snmpSendInformAcknowledgement, snmpSendInformRequest, snmpSendInformRequest, snmpSendNotification, snmpSendNotification, snmpSendTrap, snmpSendTrap, snmpSet, snmpSet, snmpSetList, snmpSetVariable, snmpSetVariableList, snmpSetVariables, vetoableChange
 
Methods inherited from class com.adventnet.snmp.beans.SnmpServer
async_create_v3_tables, create_v3_tables, genEvent, getCharacterEncoding, getHostAddress, getLocalAddresses, getMibPath, getOverwriteCMI, getPacketBufferSize, getSecLevelForTimeSync, getSecurityProvider, getSecurityTable, getSerializedMibFileName, getSimpleDateFormat, getSnmpEngineID, getSnmpEngineTable, getTimeoutInMilliSec, getTimeToWait, getUSMTable, getV3ConfigTable, getV3MsgMaxSize, initJdbcParams, initSecurityProvider, isBroadcastFeatureEnable, isLoadFromCompiledMibs, isLoadFromSerializedMibs, isLoadMibsFromDatabase, isOverwriteCMI, isOverwriteMibsInDatabase, isReadDesc, isSendPDUByGroup, isSerializeMibs, isSetAutoInformResponse, isSupportedSecurityModel, isV3DatabaseFlag, isValidateUser, manage_v3_tables, managing_v3_tables, setAutoInformResponse, setBroadcastFeatureEnable, setCharacterEncoding, setErrorFlagEnable, setLoadFromCompiledMibs, setLoadFromSerializedMibs, setLoadMibsFromDatabase, setMibOperations, setMibPath, setOverwriteCMI, setOverwriteMibsInDatabase, setPacketBufferSize, setReadDesc, setReceiveBufferSize, setSecLevelForTimeSync, setSendPDUByGroup, setSerializedMibFileName, setSerializeMibs, setSimpleDateFormat, setSnmpEngineID, setTimeoutInMilliSec, setTimeToWait, setV3ConfigTable, setV3DatabaseFlag, setV3MsgMaxSize, validateUser
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.adventnet.snmp.beans.CustomizerTemplate
create_v3_tables, getSnmpEngineTable, getUSMTable, initSecurityProvider, isSupportedSecurityModel, manage_v3_tables
 

Constructor Detail

SnmpAugmentTable

public SnmpAugmentTable(SnmpSession ses,
                        MibOperations mib)
This constructor is used to create an SnmpAugmentTable instance with a specified SnmpSession and MibOperations. Using this constructor the user can decide which SnmpSession and MibOperations instance should be used by SnmpAugmentTable.

Parameters:
ses - Instance of SnmpSession but not null and also the created SnmpSession should be opened before using in this constructor.
mib - Instance of MibOperations

SnmpAugmentTable

public SnmpAugmentTable()
Use this constructor for applications.


SnmpAugmentTable

public SnmpAugmentTable(int protocol,
                        ProtocolOptions options)
Use this constructor for applications which uses protocols other than UDP/IP.


SnmpAugmentTable

public SnmpAugmentTable(int port,
                        java.lang.String session)
Use this constructor for creating a new session for this application. If the session name is same the tables will share the same session. If the port is 0 it will use the available free port.


SnmpAugmentTable

public SnmpAugmentTable(java.applet.Applet applet)
Use this constructor for applets.

Method Detail

setTableObjectID

public void setTableObjectID(java.lang.String tableOID)
                      throws DataException
Sets the table OID to be used with this SnmpAugmentTable instance. MIB containing this table must be loaded in this VM. This method starts polling of table data and updates the table.

Parameters:
tableOID - the Object ID of the table, e.g. ifTable
Throws:
DataException - is thrown if data is invalid The following errorcodes can be set MIB_NODE_UNAVAIL,INVALID_TABLE_OID
See Also:
ErrorMessages, SnmpTarget.getErrorString(), SnmpTarget.getErrorCode()

setTableObjectIDWoStart

public void setTableObjectIDWoStart(java.lang.String tableOID)
                             throws DataException
To set the table OID without starting polling.

Parameters:
tableOID - OID of the table as a String
Throws:
DataException - is thrown if data is invalid The following errorcodes can be set MIB_NODE_UNAVAIL,INVALID_TABLE_OID
See Also:
ErrorMessages, SnmpTarget.getErrorString(), SnmpTarget.getErrorCode()

setOIDList

public void setOIDList(java.lang.String[] s)
Sets the column names of the table that needs to be polled. The setTableOID will poll all the columns of the table. Setting the column names using this method will make the bean poll only the specified columns. This method will start the automatic polling for theset columns.

Parameters:
s - a one dimensional array of column names

getCellValue

public java.lang.Object getCellValue(java.lang.String tableOID,
                                     int rowIndex,
                                     int columnIndex)
To get the value for the cell specified by the row and column index. The row and column index represent the position of the row and column in the table,both starting with zero. TableOID need not be set separately.If the object to be returned is required as a SnmpVar or SnmpVarBind object,then it can be set using setDataType() method. If the table is an Augment Table, then cell index starts from the parent table columns. Row and column index both starts from zero. By default a String object will be returned. The following errorcodes can be set MIB_NODE_UNAVAIL,INVALID_TABLE_OID

Overrides:
getCellValue in class SnmpTable
Parameters:
tableOID - OID of the table to which the cell belongs.
rowIndex - position of the row whose value is to be looked up.
columnIndex - position of the column whose value is to be looked up.
Returns:
the value for the cell as a String data.Null if tableOID is invalid.
See Also:
ErrorMessages, SnmpTarget.getErrorString(), SnmpTarget.getErrorCode(), SnmpTable.setDataType(int type), setCellValue(String tableOID,Object aValue, int rowIndex,int columnIndex)

setCellValue

public void setCellValue(java.lang.String tableOID,
                         java.lang.Object aValue,
                         int rowIndex,
                         int columnIndex)
Sets the value for the cell specified by the row and column index. The row and column index represent the position of the row and column in the table,both starting with zero. If this method is used to set the value,then the Table OID need not be set seperately using setTableOID() method. If the table is an Augment Table, then cell index starts from parent table columns. The new value can be a String or SnmpVar or SnmpVarBind object.

The following errorCodes can be set SNMP_NOT_INIT, INVALID_VERSION, OID_NOT_SPECIFIED, REQ_TIMEDOUT, EMPTY_VAR_BIND, IP_ADDR_NOT_SPECIFIED, SESSION_REMOTE_HOST_UNKNOWN, SECURITYEXP_CONNECTING_REMOTE_HOST, UNKNOWN_ERR, SNMP errors defined in ErrorMessages. ( INVALID_CONTEXT_NAME and INVALID_CONTEXT_ID are only for V3 ).

Overrides:
setCellValue in class SnmpTable
Parameters:
tableOID - OID of the table to which the cell belongs.
aValue - the new value that needs to be set.
rowIndex - position of the row whose value is to be changed.
columnIndex - position of the column whose value is to be changed.
See Also:
getCellValue(String tableOID, int rowIndex, int columnIndex), ErrorMessages, SnmpTarget.getErrorCode(), SnmpTarget.getErrorString()

getRow

public java.lang.String[] getRow(java.lang.String tableOID,
                                 java.lang.String index)
Returns the data for a row of the Table specified by the index . Index represent the instance value of the column OIDs. TableOID need not be set seperately. If the instance value of the column OIDs is not known,then getRow(int index) method can be used to get the row data.

Overrides:
getRow in class SnmpTable
Parameters:
tableOID - the OID of the table to which the row belongs.
index - instance value of the row in the table.
Returns:
the row values as an array of String. Null if a row with that index does not exist.
See Also:
SnmpTable.getRow(int index)

refreshTable

public void refreshTable()
Refreshes the table data.

Overrides:
refreshTable in class SnmpTable

setAllParams

public void setAllParams(java.lang.String host,
                         java.lang.String mib,
                         java.lang.String tableOID)
To set multiple parameters like TargetHost,MibModule and TableOID. This won't do auto polling of the table. To start the polling we have to call run() explicitly.

Parameters:
host - target host
mib - mib file
tableOID - OID of the table


Copyright (c)AdventNet Inc., 1996-2006