org.apache.camel.component.snmp
Class SnmpEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.impl.ScheduledPollEndpoint
org.apache.camel.impl.DefaultPollingEndpoint
org.apache.camel.component.snmp.SnmpEndpoint
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class SnmpEndpoint
- extends org.apache.camel.impl.DefaultPollingEndpoint
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint |
configureProperties |
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from interface org.apache.camel.Service |
start, stop |
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
SnmpEndpoint
public SnmpEndpoint(String uri,
SnmpComponent component)
- creates a snmp endpoint
- Parameters:
uri
- the endpoint uricomponent
- the component
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
- Specified by:
createConsumer
in interface org.apache.camel.Endpoint
- Overrides:
createConsumer
in class org.apache.camel.impl.DefaultPollingEndpoint
- Throws:
Exception
createProducer
public org.apache.camel.Producer createProducer()
throws Exception
- Throws:
Exception
isSingleton
public boolean isSingleton()
createExchange
public org.apache.camel.Exchange createExchange(org.snmp4j.PDU pdu)
- creates an exchange for the given message
- Parameters:
pdu
- the pdu
- Returns:
- an exchange
createExchange
public org.apache.camel.Exchange createExchange(org.snmp4j.PDU pdu,
org.snmp4j.CommandResponderEvent event)
- creates an exchange for the given message
- Parameters:
pdu
- the pduevent
- a snmp4j CommandResponderEvent
- 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)
toString
public String toString()
- Overrides:
toString
in class org.apache.camel.impl.DefaultEndpoint
Apache CAMEL