com.adventnet.snmp.rmi
Interface SnmpPoller

All Superinterfaces:
java.rmi.Remote, SnmpTarget
All Known Implementing Classes:
SnmpPollerImpl_Stub

public interface SnmpPoller
extends SnmpTarget

This RMI interface is an SNMP Poller for automatic polling of one or more variables from an SNMP agent, via a remote RMI server.

This RMI interface defines the set of services accessible remotely from an RMI client to the RMI server. By obtaining a remote reference to the object implementing this interface, the RMI client application can perform RMI calls.

After each poll, it generates events, i.e. ResultEvent objects, for which listeners can be registered.

Please see the RMI client examples for more information on getting started using the RMI APIs. 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
 
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 addResultListener(ResultListener l)
          add a listener for events from this poller.
 boolean getAbsoluteCounters()
          get whether counter values should be absolute - applies only for single variable requests.
 boolean getPollingStatus()
          Returns whether the polling is enabled.
 int getPollInterval()
          Get the current polling interval in seconds
 boolean isAutoActive()
          returns whether the poller is started automatically i.e.
 void pausePolling()
          stops the polling.
 void removeResultListener(ResultListener l)
          Remove a listener for events from this poller.
 void restartPolling()
          Restart the SNMP polling.
 void setAbsoluteCounters(boolean absoluteCounters)
          Set whether counter values should be absolute - applies only for single variable requests.
 void setAutoActive(boolean isAutoActive)
          set whether poller should start automatically after setting OID or poll interval is set or the first result listener is added.
 void setPollInterval(int i)
          Set the polling interval in seconds
 void stopPolling()
          Stop the polling.
 
Methods inherited from interface com.adventnet.snmp.rmi.SnmpTarget
addLogClient, addObjectID, addSnmpOID, create_v3_tables, getAttemptComplete, getAttemptPartial, getAuthPassword, getAuthProtocol, getCommunity, getContextID, getContextName, getErrorCode, getErrorString, getExceptionCode, getMaxNumRows, getMaxRepetitions, getMibModules, getMibOperations, getNonRepeaters, getObjectID, getObjectID, getObjectIDList, getPrincipal, getPrivPassword, getPrivProtocol, getRetries, getSecurityLevel, getSecurityModel, getSendTimeoutEvents, getSnmpOID, getSnmpOIDList, getSnmpVersion, getTargetHost, getTargetPort, getTimeout, getTimeoutInMilliSec, getVarBindCount, getWriteCommunity, initSecurityProvider, isInSubTree, isSerialize, isSupportedSecurityModel, loadMibs, manage_v3_tables, releaseResources, removeLogClient, setAttemptComplete, setAttemptPartial, setAuthPassword, setAuthProtocol, setCommunity, setContextID, setContextName, setDebug, setMaxNumRows, setMaxRepetitions, setMibModules, setNonRepeaters, setObjectID, setObjectID, setObjectIDList, setParams, setParams, setPrincipal, setPrivPassword, setPrivProtocol, setRetries, setSecurityLevel, setSecurityModel, setSendTimeoutEvents, setSnmpOID, setSnmpOIDList, setSnmpVersion, setTargetHost, setTargetPort, setTimeout, setTimeoutInMilliSec, setVarBindCount, setWriteCommunity, snmpGet, snmpGet, snmpGetAllList, snmpGetAllVariableBindings, snmpGetAllVariables, snmpGetBulkList, snmpGetBulkVariableBindings, snmpGetBulkVariables, snmpGetList, snmpGetList, snmpGetNext, snmpGetNext, snmpGetNextList, snmpGetNextList, snmpGetNextVariable, snmpGetNextVariableBinding, snmpGetNextVariableBindings, snmpGetNextVariables, snmpGetVariable, snmpGetVariableBinding, snmpGetVariableBindings, snmpGetVariables, snmpSendInformRequest, snmpSendInformRequest, snmpSendNotification, snmpSendTrap, snmpSendTrap, snmpSet, snmpSet, snmpSetList, snmpSetVariable, snmpSetVariables
 

Method Detail

getPollingStatus

public boolean getPollingStatus()
                         throws java.rmi.RemoteException
Returns whether the polling is enabled. If polling has been stopped or polling thread died, return false.

java.rmi.RemoteException

stopPolling

public void stopPolling()
                 throws java.rmi.RemoteException
Stop the polling. Does not stop the thread - only disables the data collection from the agent and event genration.

java.rmi.RemoteException

pausePolling

public void pausePolling()
                  throws java.rmi.RemoteException
stops the polling. Does not stop the thread - disables the data collection from the agent and event generation.

java.rmi.RemoteException

restartPolling

public void restartPolling()
                    throws java.rmi.RemoteException
Restart the SNMP polling. If the thread has dies for any reason, reinstantiate the polling thread and start it.

java.rmi.RemoteException

isAutoActive

public boolean isAutoActive()
                     throws java.rmi.RemoteException
returns whether the poller is started automatically i.e. Once the objectID or poll interval is set or the first result listener is added. By default after setting objectID by setObjectID(id) or set the poll interval by setPollInterval() or add the result listener by addResultListener() the Poller will start Polling. By setting setAutoActive(false) polling can be avoided as mentioned above. In this case restartPolling() can be used to start Polling.

java.rmi.RemoteException

setAutoActive

public void setAutoActive(boolean isAutoActive)
                   throws java.rmi.RemoteException
set whether poller should start automatically after setting OID or poll interval is set or the first result listener is added. By default after setting objectID by setObjectID(id) or set the poll interval by setPollInterval() or add the result listener by addResultListener() the poller will start Polling. By setting setAutoActive(false) polling can be avoided as mentioned above.In this case restartPolling can be used to start Polling.

java.rmi.RemoteException

getPollInterval

public int getPollInterval()
                    throws java.rmi.RemoteException
Get the current polling interval in seconds

java.rmi.RemoteException

setPollInterval

public void setPollInterval(int i)
                     throws java.rmi.RemoteException
Set the polling interval in seconds

java.rmi.RemoteException

getAbsoluteCounters

public boolean getAbsoluteCounters()
                            throws java.rmi.RemoteException
get whether counter values should be absolute - applies only for single variable requests. For multi-oid requests, it's up to the listener to process the counters correctly.

java.rmi.RemoteException

setAbsoluteCounters

public void setAbsoluteCounters(boolean absoluteCounters)
                         throws java.rmi.RemoteException
Set whether counter values should be absolute - applies only for single variable requests. For multi-oid requests, it's up to the listener to process the counters correctly

java.rmi.RemoteException

addResultListener

public void addResultListener(ResultListener l)
                       throws java.rmi.RemoteException
add a listener for events from this poller. The listener listens for events from any or all SNMP requests.

Specified by:
addResultListener in interface SnmpTarget
java.rmi.RemoteException

removeResultListener

public void removeResultListener(ResultListener l)
                          throws java.rmi.RemoteException
Remove a listener for events from this poller.

Specified by:
removeResultListener in interface SnmpTarget
java.rmi.RemoteException


Copyright (c)ZOHO Corp. 1996-2012