org.apache.camel.component.snmp
Class SnmpEndpoint
java.lang.Object
org.apache.camel.impl.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
public class SnmpEndpoint
- extends org.apache.camel.impl.DefaultPollingEndpoint
| 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, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous |
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.camel.Service |
start, stop |
DEFAULT_COMMUNITY
public static final java.lang.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(java.lang.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 java.lang.Exception
- Specified by:
createConsumer in interface org.apache.camel.Endpoint- Overrides:
createConsumer in class org.apache.camel.impl.DefaultPollingEndpoint
- Throws:
java.lang.Exception
createProducer
public org.apache.camel.Producer createProducer()
throws java.lang.Exception
- Throws:
java.lang.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
initiate
public void initiate()
throws java.lang.Exception
- creates and configures the endpoint
- Throws:
java.lang.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 java.lang.String getAddress()
setAddress
public void setAddress(java.lang.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 java.lang.String getSnmpCommunity()
setSnmpCommunity
public void setSnmpCommunity(java.lang.String snmpCommunity)
getProtocol
public java.lang.String getProtocol()
setProtocol
public void setProtocol(java.lang.String protocol)
toString
public java.lang.String toString()
- Overrides:
toString in class org.apache.camel.impl.DefaultEndpoint
Apache CAMEL