org.apache.camel.component.snmp
Class SnmpOIDPoller

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.impl.ScheduledPollConsumer
              extended by org.apache.camel.component.snmp.SnmpOIDPoller
All Implemented Interfaces:
Runnable, EventListener, Consumer, Service, ShutdownableService, SuspendableService, org.snmp4j.event.ResponseListener

public class SnmpOIDPoller
extends ScheduledPollConsumer
implements org.snmp4j.event.ResponseListener


Field Summary
 
Fields inherited from class org.apache.camel.impl.DefaultConsumer
log
 
Constructor Summary
SnmpOIDPoller(SnmpEndpoint endpoint, Processor processor)
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 org.snmp4j.CommunityTarget getTarget()
           
 void onResponse(org.snmp4j.event.ResponseEvent event)
           
protected  void poll()
          The polling method which is invoked periodically to poll this consumer
 void processPDU(org.snmp4j.PDU pdu)
          processes the pdu message
 void setTarget(org.snmp4j.CommunityTarget target)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
getDelay, getInitialDelay, getPollStrategy, getTimeUnit, isPollAllowed, isSuspended, isUseFixedDelay, resume, run, setDelay, setInitialDelay, setPollStrategy, setTimeUnit, setUseFixedDelay, suspend
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getAsyncProcessor, getEndpoint, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

SnmpOIDPoller

public SnmpOIDPoller(SnmpEndpoint endpoint,
                     Processor processor)
Method Detail

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class ScheduledPollConsumer
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class ScheduledPollConsumer
Throws:
Exception

poll

protected void poll()
             throws Exception
Description copied from class: ScheduledPollConsumer
The polling method which is invoked periodically to poll this consumer

Specified by:
poll in class ScheduledPollConsumer
Throws:
Exception - can be thrown if an exception occurred during polling

onResponse

public void onResponse(org.snmp4j.event.ResponseEvent event)
Specified by:
onResponse in interface org.snmp4j.event.ResponseListener

processPDU

public void processPDU(org.snmp4j.PDU pdu)
processes the pdu message

Parameters:
pdu - the pdu

getTarget

public org.snmp4j.CommunityTarget getTarget()
Returns:
Returns the target.

setTarget

public void setTarget(org.snmp4j.CommunityTarget target)
Parameters:
target - The target to set.


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.