org.apache.camel.component.snmp
Class SnmpEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.impl.ScheduledPollEndpoint
          extended by org.apache.camel.impl.DefaultPollingEndpoint
              extended by org.apache.camel.component.snmp.SnmpEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton

public class SnmpEndpoint
extends DefaultPollingEndpoint


Field Summary
static String DEFAULT_COMMUNITY
           
static int DEFAULT_SNMP_RETRIES
           
static int DEFAULT_SNMP_TIMEOUT
           
static int DEFAULT_SNMP_VERSION
           
 
Constructor Summary
SnmpEndpoint(String uri, SnmpComponent component)
          creates a snmp endpoint
 
Method Summary
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Exchange createExchange(org.snmp4j.PDU pdu)
          creates an exchange for the given message
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 String getAddress()
           
 int getDelay()
           
 OIDList getOids()
           
 String getProtocol()
           
 int getRetries()
           
 String getSnmpCommunity()
           
 int getSnmpVersion()
           
 int getTimeout()
           
 SnmpActionType getType()
           
 void initiate()
          creates and configures the endpoint
 boolean isSingleton()
          Whether this class supports being singleton or not.
 void setAddress(String address)
           
 void setDelay(int updateEvery)
          Sets update rate in seconds
 void setOids(OIDList oids)
           
 void setProtocol(String protocol)
           
 void setRetries(int retries)
           
 void setSnmpCommunity(String snmpCommunity)
           
 void setSnmpVersion(int snmpVersion)
           
 void setTimeout(int timeout)
           
 void setType(SnmpActionType type)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_COMMUNITY

public static final String DEFAULT_COMMUNITY
See Also:
Constant Field Values

DEFAULT_SNMP_VERSION

public static final int DEFAULT_SNMP_VERSION
See Also:
Constant Field Values

DEFAULT_SNMP_RETRIES

public static final int DEFAULT_SNMP_RETRIES
See Also:
Constant Field Values

DEFAULT_SNMP_TIMEOUT

public static final int DEFAULT_SNMP_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

SnmpEndpoint

public SnmpEndpoint(String uri,
                    SnmpComponent component)
creates a snmp endpoint

Parameters:
uri - the endpoint uri
component - the component
Method Detail

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Overrides:
createConsumer in class DefaultPollingEndpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Returns:
a newly created producer
Throws:
Exception - can be thrown

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Returns:
true to be a single shared instance, false to create new instances.

createExchange

public Exchange createExchange(org.snmp4j.PDU pdu)
creates an exchange for the given message

Parameters:
pdu - the pdu
Returns:
an exchange

initiate

public void initiate()
              throws Exception
creates and configures the endpoint

Throws:
Exception - if unable to setup connection

getDelay

public int getDelay()

setDelay

public void setDelay(int updateEvery)
Sets update rate in seconds

Parameters:
updateEvery - the update rate in seconds

getType

public SnmpActionType getType()

setType

public void setType(SnmpActionType type)

getOids

public OIDList getOids()

setOids

public void setOids(OIDList oids)

getAddress

public String getAddress()

setAddress

public void setAddress(String address)

getRetries

public int getRetries()

setRetries

public void setRetries(int retries)

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeout)

getSnmpVersion

public int getSnmpVersion()

setSnmpVersion

public void setSnmpVersion(int snmpVersion)

getSnmpCommunity

public String getSnmpCommunity()

setSnmpCommunity

public void setSnmpCommunity(String snmpCommunity)

getProtocol

public String getProtocol()

setProtocol

public void setProtocol(String protocol)


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