com.adventnet.snmp.ui
Class SnmpTasks

java.lang.Object
  extended by com.adventnet.snmp.beans.SnmpServer
      extended by com.adventnet.snmp.beans.SnmpRequestServer
          extended by com.adventnet.snmp.ui.SnmpTasks
All Implemented Interfaces:
CustomizerTemplate, RequestListener, ResultListener, SnmpClient, java.awt.event.ItemListener, java.beans.VetoableChangeListener, java.io.Serializable, java.util.EventListener

 class SnmpTasks
extends SnmpRequestServer
implements ResultListener, java.awt.event.ItemListener


Field Summary
(package private)  java.lang.String append_bulk_str
           
(package private)  java.lang.String append_errstr
           
(package private)  java.lang.String append_get_str
           
(package private)  java.lang.String append_next_str
           
(package private)  java.lang.String append_set_str
           
(package private)  java.lang.String append_str
           
(package private)  java.lang.Runnable appendBulkStr
           
(package private)  java.lang.Runnable appendErrStr
           
(package private)  java.lang.Runnable appendGetStr
           
(package private)  java.lang.Runnable appendNextStr
           
(package private)  java.lang.Runnable appendSetStr
           
(package private)  java.lang.Runnable appendStr
           
(package private)  boolean appletexist
           
(package private)  MibBrowser browser
          Implementation of the corresponding ResultListener method
(package private)  java.lang.String community
           
(package private)  java.lang.Runnable expandingTree
           
(package private)  boolean expandTree
           
(package private)  java.lang.String host
           
(package private)  boolean isNumericOid
           
(package private)  java.util.Vector multiOids
          Contains all the OIDs for multi-var request
(package private)  boolean multiVar
           
(package private)  SnmpOID nulloid
           
(package private)  java.lang.String oid
           
(package private)  java.lang.String oidString
           
(package private)  boolean polling
           
(package private)  SnmpOID rootoid
           
(package private) static java.lang.String serStatusFileName
           
(package private)  java.lang.String setval
           
(package private)  java.util.Vector values
          Contains all the Values for multi-var request
(package private)  java.lang.String writeCommunity
           
 
Fields inherited from class com.adventnet.snmp.beans.SnmpRequestServer
serialize
 
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, SNMPGET, SNMPGETBULK, SNMPGETNEXT, SNMPINFORM, SNMPREPORT, SNMPRESPONSE, SNMPSET, SNMPTRAP, SNMPV2TRAP, VERSION1, VERSION2C, VERSION3
 
Constructor Summary
SnmpTasks(MibBrowser browser)
           
SnmpTasks(MibBrowser browser, java.applet.Applet applet)
           
SnmpTasks(MibBrowser browser, int protocol, ProtocolOptions opts)
           
 
Method Summary
(package private)  void addVarBindList()
          Adds the OID and Value to the list
(package private)  boolean checkData(java.lang.String val, java.lang.String name)
          check for valid input
(package private)  boolean checkValues()
          check for valid input
protected  void cleanUp()
          This releases the underlying resources.
 void debugPrint(java.lang.String debugOutput)
          This method overrides the SnmpRequestServer that prints to standard error.
(package private)  void editVarBindList()
          Method modifies the OID and Value in the list if edited
(package private)  void get()
          Method used to do GET and WALK operations based on the OID.
(package private)  void getbulk()
          Method used to do GETBULK operation.
(package private)  java.util.Vector getMultipleOids()
          Returns vector of multiple OIDs
(package private)  void getnext()
          Method used to do GETNEXT operation.
(package private)  java.lang.String[] getSetValues()
          Returns array of values to do SET
(package private)  void getValues()
          update all values from the current display
(package private)  boolean isOperationInProgress()
          Returns whether any of the SNMP Operations like GET, GETNEXT, GETBULK,SET are in progress currently.
 void itemStateChanged(java.awt.event.ItemEvent ie)
           
(package private)  void logErrorMessage(java.lang.String error)
           
(package private)  void logInfoMessage(java.lang.String info)
           
(package private)  void removeVarBindList()
          Removes the varbind from the list
(package private)  void set()
          Method used to do SET operation.
 void setMibOperations(MibOperations mibOps)
          Set the MibOperations.This can be used when the API user wants the MibBrowser to use the localinstance of MibOperations instead of the Static MibOperations shared by all the other beans.
 void setNumericResult(long i)
          Implementation of the corresponding ResultListener method
 void setResult(ResultEvent e)
          Implementation of the corresponding ResultListener method
 void setStringResult(java.lang.String s)
          Implementation of the corresponding ResultListener method
(package private)  void stopPoll()
          Reset the polling variable
 
Methods inherited from class com.adventnet.snmp.beans.SnmpRequestServer
addLogClient, addLogClient, addObjectID, addRequest, addResultListener, addSnmpOID, addSnmpPropertyListener, addUserError, addV3HandShakeResultListener, authenticate, callback, deSerializeUSM, genEvent, genTimeoutEvent, getAttemptPartial, getAuthPassword, getAuthProtocol, getCommunity, getContextID, getContextName, getDebug, getEngineID, getErrorCode, getErrorResultString, getErrorString, getMaxRepetitions, getMibModules, getMibOperations, getNonRepeaters, getObjectID, getObjectID, getObjectIDList, getPrincipal, getPrivPassword, getPrivProtocol, getRetries, getSecurityLevel, getSecurityModel, getSendTimeoutEvents, getSnmpOID, getSnmpOIDList, getSnmpVersion, getTargetHost, getTargetPort, getTimeout, getUserErrorCode, getUserErrorString, getWriteCommunity, isBroadCastEnabled, isSerialize, loadMibs, readFromDatabase, releaseResources, removeLogClient, removeResultListener, removeSnmpPropertyListener, removeV3HandShakeListener, sendGetBulkRequestList, sendGetNextRequest, sendGetNextRequest, sendGetNextRequestList, sendGetNextRequestList, sendGetRequest, sendGetRequest, sendGetRequestList, sendGetRequestList, sendSetRequest, sendSetRequest, sendSetRequestList, sendSetRequestList, sendSetRequestVariable, sendSetRequestVariables, sendSetRequestVariables, sendTrap, sendTrap, setAttemptPartial, setAuthPassword, setAuthProtocol, setBroadCastEnable, setCommunity, setContextID, setContextName, setDebug, setEngineID, setMaxRepetitions, setMibModules, setNonRepeaters, setObjectID, setObjectID, setObjectIDList, setParams, setParams, setPrincipal, setPrivPassword, setPrivProtocol, setRetries, setSecurityLevel, setSecurityModel, setSendTimeoutEvents, setSnmpOID, setSnmpOIDList, setSnmpVersion, setTargetHost, setTargetPort, setTimeout, setWriteCommunity, vetoableChange
 
Methods inherited from class com.adventnet.snmp.beans.SnmpServer
async_create_v3_tables, create_v3_tables, finalize, genEvent, getCharacterEncoding, getHostAddress, getIgnoreSpecificControlCodes, 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, setIgnoreSpecificControlCodes, setLoadFromCompiledMibs, setLoadFromSerializedMibs, setLoadMibsFromDatabase, 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
 

Field Detail

oidString

java.lang.String oidString

multiVar

boolean multiVar

appletexist

boolean appletexist

expandTree

boolean expandTree

nulloid

SnmpOID nulloid

serStatusFileName

static final java.lang.String serStatusFileName
See Also:
Constant Field Values

browser

MibBrowser browser
Implementation of the corresponding ResultListener method


host

java.lang.String host

community

java.lang.String community

writeCommunity

java.lang.String writeCommunity

oid

java.lang.String oid

rootoid

SnmpOID rootoid

setval

java.lang.String setval

append_errstr

java.lang.String append_errstr

appendErrStr

java.lang.Runnable appendErrStr

append_str

java.lang.String append_str

appendStr

java.lang.Runnable appendStr

append_get_str

java.lang.String append_get_str

appendGetStr

java.lang.Runnable appendGetStr

append_next_str

java.lang.String append_next_str

appendNextStr

java.lang.Runnable appendNextStr

append_bulk_str

java.lang.String append_bulk_str

appendBulkStr

java.lang.Runnable appendBulkStr

append_set_str

java.lang.String append_set_str

appendSetStr

java.lang.Runnable appendSetStr

expandingTree

java.lang.Runnable expandingTree

isNumericOid

boolean isNumericOid

polling

boolean polling

multiOids

java.util.Vector multiOids
Contains all the OIDs for multi-var request


values

java.util.Vector values
Contains all the Values for multi-var request

Constructor Detail

SnmpTasks

SnmpTasks(MibBrowser browser)

SnmpTasks

SnmpTasks(MibBrowser browser,
          java.applet.Applet applet)

SnmpTasks

SnmpTasks(MibBrowser browser,
          int protocol,
          ProtocolOptions opts)
Method Detail

getValues

void getValues()
update all values from the current display


get

void get()
Method used to do GET and WALK operations based on the OID.


getnext

void getnext()
Method used to do GETNEXT operation.


getbulk

void getbulk()
Method used to do GETBULK operation.


set

void set()
Method used to do SET operation.


setResult

public void setResult(ResultEvent e)
Implementation of the corresponding ResultListener method

Specified by:
setResult in interface ResultListener

checkValues

boolean checkValues()
check for valid input


checkData

boolean checkData(java.lang.String val,
                  java.lang.String name)
check for valid input


debugPrint

public void debugPrint(java.lang.String debugOutput)
This method overrides the SnmpRequestServer that prints to standard error.

Specified by:
debugPrint in interface SnmpClient
Overrides:
debugPrint in class SnmpRequestServer

setStringResult

public void setStringResult(java.lang.String s)
Implementation of the corresponding ResultListener method

Specified by:
setStringResult in interface ResultListener

setNumericResult

public void setNumericResult(long i)
Implementation of the corresponding ResultListener method

Specified by:
setNumericResult in interface ResultListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ie)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

addVarBindList

void addVarBindList()
Adds the OID and Value to the list


removeVarBindList

void removeVarBindList()
Removes the varbind from the list


editVarBindList

void editVarBindList()
Method modifies the OID and Value in the list if edited


getSetValues

java.lang.String[] getSetValues()
Returns array of values to do SET


getMultipleOids

java.util.Vector getMultipleOids()
Returns vector of multiple OIDs


stopPoll

void stopPoll()
Reset the polling variable


cleanUp

protected void cleanUp()
This releases the underlying resources. Call to this will deregister it as a SnmpRequestListener


setMibOperations

public void setMibOperations(MibOperations mibOps)
Set the MibOperations.This can be used when the API user wants the MibBrowser to use the localinstance of MibOperations instead of the Static MibOperations shared by all the other beans. Note:This will over-write the existing MibOperations used by the other beans.

Overrides:
setMibOperations in class SnmpServer

isOperationInProgress

boolean isOperationInProgress()
Returns whether any of the SNMP Operations like GET, GETNEXT, GETBULK,SET are in progress currently.


logErrorMessage

void logErrorMessage(java.lang.String error)

logInfoMessage

void logInfoMessage(java.lang.String info)