com.adventnet.adaptors.snmp
Class JMXSnmpAgent

java.lang.Object
  extended by com.adventnet.snmp.snmp2.agent.Cache
      extended by com.adventnet.snmp.snmp2.agent.BaseSnmpStore
          extended by com.adventnet.snmp.snmp2.agent.BaseSnmpAgent
              extended by com.adventnet.snmp.snmp2.agent.SnmpAgent
                  extended by com.adventnet.adaptors.snmp.JMXSnmpAgent
All Implemented Interfaces:
PropertyRegistrationListener, SnmpClient, AgentEventListener, java.io.Serializable

 class JMXSnmpAgent
extends SnmpAgent


Field Summary
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SnmpAgent
actionHandlerListener, homeDirectory, remoteV3Client
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpAgent
AgentScheduler, api, decoder, ENABLE_SNMP_AUTHEN_TRAPS, pduRequestHdlr, port, schedulerHash, snmpLog, snmpVersion, started, startTime, statusListener, TRANSPORT_PROVIDER, trapListener, utilities, versionInInt
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
debugLevel, localAddress, protocol, session
 
Constructor Summary
JMXSnmpAgent(int port, SnmpAdaptor adaptor)
           
JMXSnmpAgent(SnmpAdaptor adaptor)
           
JMXSnmpAgent(java.lang.String ipAddress, SnmpAdaptor adaptor)
           
 
Method Summary
 boolean authenticate(SnmpPDU pdu, java.lang.String community)
          This method is called before the callback and related processing methods are called has a simple checks based on the community of the pdu which has been received.
 boolean callback(SnmpSession session, SnmpPDU pdu, int reqid)
          The callback of SnmpClient interface for incoming PDUs which is implemented by this agent.
 void send(SnmpPDU newPdu)
          Sends the PDU out from the agent.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SnmpAgent
addActionHandler, addRemoteV3Client, addV3Initialiser, decodePdu, enableUsmSpinLock, getAclTableInstance, getEngineBootsFileName, getRemoteV3Client, getSerializeFileName, getSnmpCommunityTableListener, getSnmpNotifyFilterProfileTableListener, getSnmpNotifyFilterTableListener, getSnmpNotifyTableListener, getSnmpTargetAddrExtTableListener, getSnmpTargetAddrTableListener, getSnmpTargetParamsTableListener, getSnmpVacm, getSpinLock, getSubAgent, getUsmUserTableListener, getV3AdaptorStorageMode, getV3Configuration, getV3Initialiser, getVacmAccessTableListener, getVacmContextTableListener, getVacmSecurityToGroupTableListener, getVacmViewTreeFamilyTableListener, getViewBasedFlag, getWindowsSubAgent, initializeAdaptorV3Settings, isRemoteConfigurable, isSnmpV3Compliance, isStrictlyV3, isUsmSpinLockEnabled, killSnmpAgent, nativeInit, nativeStdOutErr, readValuesFromConf, removeRemoteV3Client, restartSnmpAgent, serializeTable, setAclTableInstance, setDebug, setDebugOff, setDebugOn, setEngineBootsFileName, setSerializeFileName, setSnmpV3Compliance, setSnmpVersion, setSpinLock, setStrictlyV3, setSubAgent, setTrapSourceDefault, setV3Configuration, setVacmRemoteConfiguration, setViewBasedFlag, setWarmStart, setWindowsSubAgent, stopSnmpAgent
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpAgent
addAccessListener, addAuthenticationListener, addClientAndOpenSession, addRegistrationListener, addSnmpPduRequestListener, addSnmpSetGroupListener, addSysORTableListener, addSystemGroupListener, addTrapRequestListener, authenticateReceivedCommunity, checkVersion, createProtocolOptions, createStatusEvent, debugPrint, disableAuthTraps, disableStartUpTrap, genPort, getAccessListener, getAsyncMode, getCommunityVector, getDebugLevel, getLocalAddress, getMaxThreads, getPort, getReadCommunities, getReadCommunity, getSnmpGroup, getSnmpVersion, getSystemGroupListener, getUpTime, getV1v2AccessControl, getV1v2AccessControlTable, getWriteCommunities, getWriteCommunity, handleInformRequest, incrementSnmpOutTraps, isCallbackThread, isStarted, isTrapSourceDefault, removeAuthenticationListener, removeSnmpClient, removeSnmpPduRequestListener, removeSysORTableListener, restartSnmpAgent, scheduleAndProcessRequestEvent, sendAuthenticationFailureTrap, sendGenericTrap, setAgentScheduler, setAsyncMode, setCallbackThread, setCommunityVector, setDebugLevel, setDefaultTrap, setEnableAuthenTraps, setLocalAddress, setMaxThreads, setPort, setPort, setProtocol, setReadCommunities, setReadCommunity, setSnmpVersion, setStarted, setV1v2AccessControl, setV1v2AccessControlTable, setWriteCommunities, setWriteCommunity
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
closeAll, finalize, getSnmpAPI, getSnmpSession, getSnmpSession, initSession, initSnmpStore, isAlive, isDebug
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache
getFromCache, getMibOperations, putInCache, setMibOperations
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXSnmpAgent

public JMXSnmpAgent(java.lang.String ipAddress,
                    SnmpAdaptor adaptor)

JMXSnmpAgent

public JMXSnmpAgent(int port,
                    SnmpAdaptor adaptor)

JMXSnmpAgent

public JMXSnmpAgent(SnmpAdaptor adaptor)
Method Detail

callback

public boolean callback(SnmpSession session,
                        SnmpPDU pdu,
                        int reqid)
Description copied from class: BaseSnmpAgent
The callback of SnmpClient interface for incoming PDUs which is implemented by this agent.

When a pdu reached at the session for which this SnmpAgent is registered as SnmpClient, then the client(here BaseSnmpAgent) callback is called.

Specified by:
callback in interface SnmpClient
Overrides:
callback in class SnmpAgent
Parameters:
session - the session on which agent is communicating.
pdu - the Snmp PDU.
reqid - the value of reqid.

send

public void send(SnmpPDU newPdu)
          throws SnmpException
Description copied from class: SnmpAgent
Sends the PDU out from the agent. This is an asynchronous send which SnmpPduRequestListeners could use to send back responses.

Overrides:
send in class SnmpAgent
Parameters:
newPdu - the response PDU.
Throws:
SnmpException - on send errors or if the session is not alive

authenticate

public boolean authenticate(SnmpPDU pdu,
                            java.lang.String community)
Description copied from class: SnmpAgent
This method is called before the callback and related processing methods are called has a simple checks based on the community of the pdu which has been received.

Specified by:
authenticate in interface SnmpClient
Overrides:
authenticate in class SnmpAgent
Parameters:
pdu - the Snmp PDU.
community - the value of the community.
Returns:
false if the PDU doesnt satisfy authentication mechanism
See Also:
SnmpClient