|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ConsumerEndpoint
org.apache.servicemix.common.endpoints.PollingEndpoint
org.apache.servicemix.snmp.SnmpPollingEndpoint
public class SnmpPollingEndpoint
This is the polling endpoint for the snmp component.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_COMMUNITY
|
static int |
DEFAULT_SNMP_RETRIES
|
static int |
DEFAULT_SNMP_TIMEOUT
|
static int |
DEFAULT_SNMP_VERSION
|
| Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
definition, description, endpoint, interfaceName, service, serviceUnit |
| Constructor Summary | |
|---|---|
SnmpPollingEndpoint()
|
|
| Method Summary | |
|---|---|
void |
activate()
|
java.lang.String |
getAddress()
|
SnmpMarshalerSupport |
getMarshaler()
|
OIDList |
getOids()
|
int |
getRetries()
|
java.lang.String |
getSnmpCommunity()
|
int |
getSnmpVersion()
|
int |
getTimeout()
|
void |
onResponse(org.snmp4j.event.ResponseEvent event)
|
void |
poll()
|
void |
process(javax.jbi.messaging.MessageExchange exchange)
|
void |
setAddress(java.lang.String address)
Specifies the connection URI used to connect to a snmp capable device. |
void |
setMarshaler(SnmpMarshalerSupport marshaler)
Specifies a marshaler class which provides the logic for converting a snmp response into a normalized message. |
void |
setOids(OIDList oids)
Specifies a reference to a list of OID values which will be used for the snmp request. |
void |
setRetries(int retries)
Specifies the connection retries. |
void |
setSnmpCommunity(java.lang.String snmpCommunity)
Specifies the snmp community to use. |
void |
setSnmpVersion(int snmpVersion)
Specifies the snmp protocol version to use. |
void |
setTimeout(int timeout)
Specifies the connection time out in milliseconds. |
void |
start()
|
void |
stop()
|
void |
validate()
|
| Methods inherited from class org.apache.servicemix.common.endpoints.PollingEndpoint |
|---|
getDelay, getExecutor, getFirstTime, getPeriod, getScheduler, handlePollException, isConcurrentPolling, setConcurrentPolling, setDelay, setFirstTime, setPeriod, setScheduler |
| Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint |
|---|
configureExchangeTarget, deactivate, getLocationURI, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri |
| Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync |
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_COMMUNITY
public static final int DEFAULT_SNMP_VERSION
public static final int DEFAULT_SNMP_RETRIES
public static final int DEFAULT_SNMP_TIMEOUT
| Constructor Detail |
|---|
public SnmpPollingEndpoint()
| Method Detail |
|---|
public void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class ConsumerEndpointjava.lang.Exception
public void start()
throws java.lang.Exception
start in interface Endpointstart in class PollingEndpointjava.lang.Exception
public void stop()
throws java.lang.Exception
stop in interface Endpointstop in class PollingEndpointjava.lang.Exception
public void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class ConsumerEndpointjavax.jbi.management.DeploymentException
public void poll()
throws java.lang.Exception
poll in class PollingEndpointjava.lang.Exception
public void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class AbstractEndpointjava.lang.Exceptionpublic void onResponse(org.snmp4j.event.ResponseEvent event)
onResponse in interface org.snmp4j.event.ResponseListenerpublic java.lang.String getAddress()
public void setAddress(java.lang.String address)
Specifies the connection URI used to connect to a snmp capable device.
Template:
<protocol>:<host>/<port>
Details:
| Name | Description |
| protocol | the protocol to use (udp or tcp) |
| host | the name or ip address of the snmp capable device |
| port | the port number to use |
address - a String value containing the connection detailspublic int getRetries()
public void setRetries(int retries)
Specifies the connection retries.
The default value is 2
retries - a int value containing the retry countpublic int getTimeout()
public void setTimeout(int timeout)
Specifies the connection time out in milliseconds.
The default value is 1500
timeout - a int value containing the time out in millispublic int getSnmpVersion()
public void setSnmpVersion(int snmpVersion)
Specifies the snmp protocol version to use.
The default value is 0 (version 1)
snmpVersion - a int value containing the snmp versionpublic java.lang.String getSnmpCommunity()
public void setSnmpCommunity(java.lang.String snmpCommunity)
Specifies the snmp community to use.
The default value is "public"
snmpCommunity - a String value containing the snmp communitypublic SnmpMarshalerSupport getMarshaler()
public void setMarshaler(SnmpMarshalerSupport marshaler)
Specifies a marshaler class which provides the logic for converting
a snmp response into a normalized message. This class has to implement
the SnmpMarshalerSupport interface. If you don't specify a
marshaler, the DefaultSnmpMarshaler will be used.
marshaler - a class which implements SnmpMarshalerSupportpublic OIDList getOids()
public void setOids(OIDList oids)
Specifies a reference to a list of OID values which will be used for
the snmp request. You have two possibilities how to specify the value:
a) referencing to a file containing a list of OID values separated by a line feed
or
b) defining a coma (,) separated list of OID values
Examples:
a) oids="classpath:myOids.txt"
oids="file:/home/lhein/snmp/device_a/oids.txt"
b) oids="1.3.6.1.2.1.1.3.0 , 1.3.6.1.2.1.25.3.2.1.5.1 , 1.3.6.1.2.1.25.3.5.1.1.1 , 1.3.6.1.2.1.43.5.1.1.11.1"
oids - a OIDList containing the OID values for the request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||