com.adventnet.snmp.beans
Class ClippedTable

java.lang.Object
  |
  +--com.adventnet.snmp.beans.SnmpServer
        |
        +--com.adventnet.snmp.beans.SnmpTarget
              |
              +--com.adventnet.snmp.beans.SnmpTable
                    |
                    +--com.adventnet.snmp.beans.ClippedTable
Direct Known Subclasses:
DefaultSnmpTablePanelModel

public class ClippedTable
extends SnmpTable

The ClippedTable class is an extention of SnmpTable for large SNMP tables. A bean that uses this class is the SnmpTablePanel bean in the com.adventnet.snmp.ui package. Use the SnmpTablePanel bean when you need to display large tables.

See the largetable.java application example in the uiapplications directory.

See Also:
Serialized Form

Field Summary
(package private)  boolean end_flag
           
(package private)  boolean end_flagInd
           
(package private)  int FROM_INDEX
           
(package private)  int FROM_ORIGIN
           
 int[] indeces
           
(package private)  boolean index_flag
           
(package private)  java.util.Vector indexMibNodes
           
(package private)  java.util.Vector indexNames
           
(package private)  boolean isAugmentedDisplay
           
(package private)  int modeOfGetting
           
(package private)  boolean next
           
(package private)  boolean next_1
           
(package private)  int numberVisibleRow
           
(package private)  boolean polling
           
(package private)  int row_count
           
(package private)  java.util.Stack stack
           
(package private)  java.util.Stack stackInd
           
(package private)  boolean stop
           
(package private)  java.lang.String[][] stringData
           
(package private)  java.lang.String stroid
           
(package private)  SnmpOID[] subOidList
           
(package private)  java.lang.String tableoid
           
(package private)  int temp_count
           
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTable
ADDandDELcol, augmentedTableoid, cnam, colOIDs, columnClass, columnNames, columns, columnsPolled, DATA_TYPE, editable, externalIndices, holes, holesCount, holesGot, isAugmentedTable, isEntryStatus, isNotInSubTree, noAccessIndex, nodes, num_col, performSets, pollInterval, RETRIEVAL_MODE, rootoid, rowtry, shifting, SNMP_VARIABLE_BINDING_DATA, SNMP_VARIABLE_DATA, STRING_DATA, syntax, tableData, tableListeners, tableOID, thisThread
 
Fields inherited from class com.adventnet.snmp.beans.SnmpTarget
ackFlag, debugListeners, genericTrap, genericTraps, informReqID, mibModules, serialize, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, SNMPTRAP, snmpTrapEnterprise, snmpTrapOid, SNMPV2TRAP, upTime, VERSION1, VERSION2C, VERSION3
 
Fields inherited from class com.adventnet.snmp.beans.SnmpServer
api, applet, ASN1_ERROR_ERR, ASN1_ERROR_OID, attemptCompleteData, attemptPartialData, AUTH_NO_PRIV, AUTH_PRIV, authKey, authPassword, authProtocol, broadCast, clientID, community, contextID, contextName, count, debugon, DECRYPT_ERROR_ERR, DECRYPT_ERROR_OID, discoveryTimeSyncListener, enc, engineID, engineTable, error, errorCode, errorcodes, errorIndex, exceptionCode, exceptionCodes, finalize_called, group, group_oidList, isName, isNotSet, isSendPDUByGroup, listeners, localAddrs, localPort, logFlag, loggerImpl, logLevel, logType, matchServ, matchtable, MAX_NUM_ROWS, maxRepetitions, MD5_AUTH, mibOps, NO_AUTH, NO_AUTH_NO_PRIV, nonRepeaters, NOT_TIME_WINDOWS_ERR, NOT_TIME_WINDOWS_OID, nullsession_targets, oidList, options, pduErrorIndex, pollertargets, pollInterval, port, port_targets, principal, printStr, privKey, privPassword, privProtocol, propertylisteners, protocol, reqHandler, reqid, retries, secModel, securityLevel, sendTimeoutEvents, sentreqid, session, session_port_targets, session_targets, sessionName, SHA_AUTH, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, snmpStore, SNMPTRAP, SNMPV2TRAP, targetHost, targets, timeout, UKN_ENGINEID_ERR, UKN_ENGINEID_OID, UKN_USERNAMES_ERR, UKN_USERNAMES_OID, UNSUPP_SEC_LEVEL_ERR, UNSUPP_SEC_LEVEL_OID, userError, userErrorCode, usmTable, v3ErrorTable, validateUser, varbinds_per_request, varList, version, VERSION1, VERSION2C, VERSION3, writeCommunity, WRONG_DIGEST_ERR, WRONG_DIGEST_OID
 
Constructor Summary
ClippedTable()
          Use this constructor for Applications
ClippedTable(java.applet.Applet applet)
          Use this constructor for Applets
 
Method Summary
 void addRow(boolean status, java.lang.String[] s)
          To add a row of data into the table .Rows can be added to a table only if, the table is a SMIv1 table with EntryStatus defined or SMIv2 table with RowStatus defined.
(package private)  void copyIndex()
           
 void emptyStack()
          clear the contents of origin stack
 void emptyStackInd()
          clear the contents of index stack
protected  void finalize()
          Cleans up an object when there are no more references to that object.
 java.util.Vector getAllColumnNodes()
          Gets all the column mib nodes available in the snmpTable.
 int getColumnIndex(java.lang.String colName)
          Gets the index value of the column name specified.
 java.util.Vector getColumnMibNodes()
          Gets the mib nodes for the columns in the table.
 java.util.Vector getColumns()
          Returns vector of names of columns in the table.
 void getCurrentPage()
          get currentPage
 int[] getHoles()
          Gets the index of the not-implemented columns.Holes are the columns that are not defined by the agent.
 java.util.Vector getIndexMibNodes()
          Gets the Mibnodes for the indices in Table
 java.util.Vector getIndexNames()
          Gets the names of the indices in the table.
 java.lang.String getInstanceStr(int index)
          used to display the index value of the selected row in table
 java.util.Vector getLeafSyntax()
           
 int getModeOfGettingTable()
          Not for API users.Returns the mode of getting table
 boolean getNext()
          Returns the state of the button "Next" in SnmpTablePanel.
 java.lang.String[][] getNotAccessibleIndex()
          Gets the values for the not-accessible indices of the snmpTable.
 java.util.Vector getNotAccessIndexColumns()
          Gets the names of the not-accessible index columns in the table.
 int getNumCols()
          Gets the total number of columns present in the SnmpTable
 int getNumOfVisibleRows()
          Gets the number of rows that will be visible in the SnmpTablePanel.
 boolean getOverwriteCMI()
          Gets the overwrite compiled mibs boolean.
 int getPageSize()
          Returns the number of pages in table stack, i.e.
 int getPolledNumRows()
          Gets the number of rows actually polled.
 java.lang.String getSerializedMibFileName()
          gets the name of the Serialized Mib file
 java.util.Vector getSnmpVarVec(int i)
          Gets a vector of SnmpVar value of the specified row in the table.
 java.lang.String getStringValueAt(int i, int j)
          Gets the string value for the cell specified by the row and column index.
 java.lang.String[] getTableColumnNames()
           
 boolean isAugmentedDisplay()
          returns the status of table whether it is agugmented table or of its original table.
 boolean isAugmentedTable()
          returns whether the table is augmented one or not
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns the boolean state of a cell whether the cell is editable or not.
 boolean isEndOfTable()
          Returns the boolean state whether the end of table is reached or not.
 boolean isLoadFromCompiledMibs()
          To check whether the mib will be loaded from CompiledMib files or not.
 boolean isLoadFromSerializedMibs()
          To check whether the mib will be loaded from Serialized Mib files or not.
 boolean isReadDesc()
          Retuns the boolean state of the reading descriptions from compiled modules.
 boolean isSerializeMibs()
          gets the serializeMibs boolean
protected  void refresh()
          refresh the table
 void run()
          The run method does polling and updates of the table at specified polling itervals.
 void run1()
          method added for the purpose of Table Updation.Not for API users.
 void setAugmentedDisplay(boolean augmented)
          set the status of table whether it is augumented table or of its original table.
 void setHeaderName(int index, java.lang.String name)
          Sets the string value as the column header of the column given by the index.
 void setIndex()
          adjust the oidList in stack for further operation when getting rows from origin.
 void setIndexForIndex()
          Used to create a oidList from the index box ,push that oidlist into index stack and polling the table.
 void setIndexInd()
          adjust the oidList in stack for further operation when getting rows starting with given index.
 void setLoadFromCompiledMibs(boolean flag)
          Defines whether to load mib from compiled MIBs.
 void setLoadFromSerializedMibs(boolean flag)
          Defines whether to load MIB from serialized file.
 void setModeOfGettingTable(int mode)
          Not for API users.set the mode of getting table
 void setNext_1(boolean bool)
          Not for API users.
 void setNext(boolean bool)
          Not for API users.
 void setNumCols(int i)
          Sets the number of columns to be visible in the SnmpTable panel.
 void setNumOfVisibleRows(int numVisibleRow)
          Sets the number rows to be visible in the SnmpTablePanel.
 void setObjectIDList(java.lang.String[] s)
          Sets the list of object IDs based on the specified string array.
 void setOverwriteCMI(boolean overWrite)
          Defines whether to overwrite the existing compiled MIB files.
 void setReadDesc(boolean readFlag)
          Sets the flag to read descriptions from compiled mib modules.
 void setSerializedMibFileName(java.lang.String serFileName)
          Defines the name of the Serialized MIB File.
 void setSerializeMibs(boolean flag)
          method defines whether to serialize the MibModule This flag should be set before loading the MIBs.
 void setSnmpOIDList(SnmpOID[] list)
          Sets the list of object IDs given as an array of SnmpOID instances.
 void setStringOID(java.lang.String s)
          Not for API users.
 void setStringValueAt(java.lang.String data, int i, int j)
          Sets the value for the cell specified by the row and column index.
 void setsubOidList()
          Not for API users.
 void setTableOID(java.lang.String tableOID)
          Specify table to be used with this SnmpTable instance.
 void setvalue(java.lang.Object aValue, int rowIndex, int columnIndex)
          Sets the value for the cell specified by the row and column index.
protected  void showErrorMessage(java.lang.String str)
           
 void stopCurrentThread(boolean st)
          Used to stop the thread from reading table data Not for API users.
 void stopPolling()
          This will stop the polling of table data.
 
Methods inherited from class com.adventnet.snmp.beans.SnmpTable
addRow, addSnmpTableListener, checkDifferences, compareRow, deleteRow, genTableEvent, getCellValue, getColumn, getColumn, getColumnClass, getColumnCount, getColumnMibNode, getColumnName, getDataType, getIndices, getNotAccessibleIndexColumns, getPerformSets, getPerformSets, getPollInterval, getRetrievalMode, getRow, getRow, getRow, getRowCol, getRowCount, getRowFromArray, getTableOID, getValueAt, refreshTable, removeSnmpTableListener, setCellValue, setColumnsPolled, setDataType, setObjectIDListWoStart, setParams, setPollInterval, setRetrievalMode, setSuperObjectIDList, setTableOIDWoStart, setValueAt, 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, getRetries, getSecurityLevel, getSecurityModel, getSendTimeoutEvents, getSnmpOID, getSnmpOIDList, getSnmpVariables, getSnmpVersion, getTargetHost, getTargetPort, getTimeout, getUserErrorCode, getUserErrorString, getV1TrapOids, getVarBindCount, getWriteCommunity, isInSubTree, 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, setRetries, setSecurityLevel, setSecurityModel, setSendTimeoutEvents, setSnmpOID, 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, updateMibs, vetoableChange
 
Methods inherited from class com.adventnet.snmp.beans.SnmpServer
assignLogger, async_create_v3_tables, create_v3_tables, genEvent, getCharacterEncoding, getCompleteResponse, getGROUPSNMPResponse, getHostAddress, getLocalAddresses, getMibPath, getPacketBufferSize, getPdu, getSecLevelForTimeSync, getSecurityProvider, getSecurityTable, getSimpleDateFormat, getSnmpEngineID, getSnmpEngineTable, getSNMPResponse, getSNMPResponse, getSNMPResponse, getTimeoutInMilliSec, getTimeToWait, getUSMTable, getV3ConfigTable, initJdbcParams, initSecurityProvider, initSnmpStore, isBroadcastFeatureEnable, isLoadMibsFromDatabase, isOverwriteCMI, isOverwriteMibsInDatabase, isSendPDUByGroup, isSetAutoInformResponse, isSupportedSecurityModel, isV3DatabaseFlag, isValidateUser, logErrorMessage, logInfoMessage, manage_v3_tables, managing_v3_tables, sendSNMPRequest, sendSNMPRequest, sendSNMPRequest, setAutoInformResponse, setBroadcastFeatureEnable, setCharacterEncoding, setErrorMessage, setLoadMibsFromDatabase, setMibOperations, setMibPath, setOverwriteMibsInDatabase, setPacketBufferSize, setPduParams, setReceiveBufferSize, setSecLevelForTimeSync, setSendPDUByGroup, setSimpleDateFormat, setSnmpEngineID, setTimeoutInMilliSec, setTimeToWait, setV3ConfigTable, setV3DatabaseFlag, updateEntry, validateUser
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stop

boolean stop

stack

java.util.Stack stack

stackInd

java.util.Stack stackInd

subOidList

SnmpOID[] subOidList

stringData

java.lang.String[][] stringData

next

boolean next

numberVisibleRow

int numberVisibleRow

row_count

int row_count

temp_count

int temp_count

indeces

public int[] indeces

end_flag

boolean end_flag

end_flagInd

boolean end_flagInd

index_flag

boolean index_flag

polling

boolean polling

indexNames

java.util.Vector indexNames

indexMibNodes

java.util.Vector indexMibNodes

isAugmentedDisplay

boolean isAugmentedDisplay

tableoid

java.lang.String tableoid

next_1

boolean next_1

stroid

java.lang.String stroid

FROM_ORIGIN

int FROM_ORIGIN

FROM_INDEX

int FROM_INDEX

modeOfGetting

int modeOfGetting
Constructor Detail

ClippedTable

public ClippedTable()
Use this constructor for Applications

ClippedTable

public ClippedTable(java.applet.Applet applet)
Use this constructor for Applets
Method Detail

isAugmentedTable

public boolean isAugmentedTable()
returns whether the table is augmented one or not

setAugmentedDisplay

public void setAugmentedDisplay(boolean augmented)
set the status of table whether it is augumented table or of its original table. Set true if the visible table is its augmented table, set returns false if it is a original table what specified in setTableOID

isAugmentedDisplay

public boolean isAugmentedDisplay()
returns the status of table whether it is agugmented table or of its original table.
Returns:
true if the visible table is its augmented table, returns false if it is a original table what specified in setTableOID.

setTableOID

public void setTableOID(java.lang.String tableOID)
                 throws DataException
Specify table to be used with this SnmpTable instance. MIB containing this table must be loaded in this VM. This will set the following errors codes INVALID_TABLE_OID,MIB_NODE_UNAVAIL,INVALID_TABLE_OID EXT_INDEX_UNAVAIL.
Overrides:
setTableOID in class SnmpTable
Parameters:
tableOID - the Object ID of the table, e.g. ifTable.
Throws:
DataException - is thrown on errors.
See Also:
ErrorMessages.

getColumnMibNodes

public java.util.Vector getColumnMibNodes()
Gets the mib nodes for the columns in the table.
Returns:
vector of MibNodes for columns in table specified by tableOID.

getAllColumnNodes

public java.util.Vector getAllColumnNodes()
Gets all the column mib nodes available in the snmpTable.
Returns:
vector of MibNodes for columns in table specified by tableOID

getColumnIndex

public int getColumnIndex(java.lang.String colName)
Gets the index value of the column name specified.
Parameters:
colName - column name of the table, e.g. ifType
Returns:
the index of the column name as an int value.

getIndexNames

public java.util.Vector getIndexNames()
Gets the names of the indices in the table.
Returns:
vector of names of indexes in the table specified by tableOID

addRow

public void addRow(boolean status,
                   java.lang.String[] s)
            throws DataException
To add a row of data into the table .Rows can be added to a table only if, the table is a SMIv1 table with EntryStatus defined or SMIv2 table with RowStatus defined.
Parameters:
status - true if the table has EntryStatus column and false if it has RowStatus column.
s - array of values to be added in the table.
Throws:
DataException - is thrown on errors

copyIndex

void copyIndex()

emptyStack

public void emptyStack()
clear the contents of origin stack

emptyStackInd

public void emptyStackInd()
clear the contents of index stack

setIndexForIndex

public void setIndexForIndex()
Used to create a oidList from the index box ,push that oidlist into index stack and polling the table. Not for API users.

getCurrentPage

public void getCurrentPage()
get currentPage

setIndex

public void setIndex()
adjust the oidList in stack for further operation when getting rows from origin. Not for API users.

setIndexInd

public void setIndexInd()
adjust the oidList in stack for further operation when getting rows starting with given index. Not for API users.

getInstanceStr

public java.lang.String getInstanceStr(int index)
used to display the index value of the selected row in table

stopCurrentThread

public void stopCurrentThread(boolean st)
Used to stop the thread from reading table data Not for API users.

run

public void run()
The run method does polling and updates of the table at specified polling itervals. 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 ,INVALID_CONTEXT_ID.
Overrides:
run in class SnmpTable
See Also:
ErrorMessages, SnmpTarget.getErrorCode(), SnmpTarget.getErrorString()

run1

public void run1()
method added for the purpose of Table Updation.Not for API users.