# Element Summary

Element | Description | Class
--- | --- | ---
component | SNMP Component | org.apache.servicemix.snmp.SnmpComponent
poller | This is the polling endpoint for the snmp component. | org.apache.servicemix.snmp.SnmpPollingEndpoint
trap-consumer | This is the trap endpoint for the snmp component. This endpoint receives and process trap PDUs from a device. Then it sends an exchange to the target service containing the processed content. | org.apache.servicemix.snmp.SnmpTrapConsumerEndpoint

# Element Detail

## Element: component

Element | Type | Description
--- | --- | ---
endpoints | (poller | trap-consumer)* |
executorFactory | <spring:bean/> | The executor factory to use to create the executor. If none is provided, one will be retrieved from the JBI container when the component is deployed into ServiceMix 3.x, or a default implementation will be used.

## Element: poller

Attribute | Type | Description
--- | --- | ---
address | xs:string | 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
Example: udp:192.168.2.122/161 The default value is null
concurrentPolling | xs:boolean | Sets whether more than one poll can be active at a time (true means yes). Default value is `false`.
delay | xs:long | Sets the amount of time in milliseconds that the endpoint should wait before making the first poll.
endpoint | xs:string | Get the endpoint implementation.
firstTime | xs:date | Sets the date on which the first poll will be executed. If a delay is also set using `setDelay`, the delay interval will be added after the date specified.
interfaceName | xs:QName | Get the qualified name of the endpoint interface.
period | xs:long | Sets the number of milliseconds between polling attempts.
retries | xs:integer | Specifies the connection retries. The default value is 2
service | xs:QName | Get the service qualified name of the endpoint.
snmpCommunity | xs:string | Specifies the snmp community to use. The default value is "public"
snmpVersion | xs:integer | Specifies the snmp protocol version to use. The default value is 0 (version 1)
targetEndpoint | xs:string | the name of the endpoint to which requests are sent
targetInterface | xs:QName | the QName of the interface to which requests are sent
targetOperation | xs:QName | the QName of the operation to which requests are sent
targetService | xs:QName | the QName of the service to which requests are sent
targetUri | xs:string | Gets the target URI of the consumer endpoint.
timeout | xs:integer | Specifies the connection time out in milliseconds. The default value is 1500

Element | Type | Description
--- | --- | ---
marshaler | <spring:bean/> | 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.
oids | (<spring:bean/>)* | 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" The default value is null
scheduler | <spring:bean/> | Sets a custom scheduler implementation if you need more fine-grained control over the polling schedule.

## Element: trap-consumer

Attribute | Type | Description
--- | --- | ---
address | xs:string | 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
Example: udp:192.168.2.122/162 The default value is null
enabled | xs:boolean | Specifies wether the endpoint is enabled or not. If its value is set to true, the connection data will be setted and trap PDUs will be processed. Otherwise, the endpoint won't do anything.
endpoint | xs:string | Get the endpoint implementation.
interfaceName | xs:QName | Get the qualified name of the endpoint interface.
service | xs:QName | Get the service qualified name of the endpoint.
targetEndpoint | xs:string | the name of the endpoint to which requests are sent
targetInterface | xs:QName | the QName of the interface to which requests are sent
targetOperation | xs:QName | the QName of the operation to which requests are sent
targetService | xs:QName | the QName of the service to which requests are sent
targetUri | xs:string | Gets the target URI of the consumer endpoint.

Element | Type | Description
--- | --- | ---
marshaler | <spring:bean/> | Specifies a marshaler class which provides the logic for converting a snmp trap into a normalized message. This class has to implement the `SnmpMarshalerSupport` interface. If you don't specify a marshaler, the `DefaultSnmpMarshaler` will be used.