public class SnmpTrapConsumerEndpoint extends ConsumerEndpoint implements SnmpEndpointType, org.snmp4j.CommandResponder
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ENABLED_VALUE |
loggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
SnmpTrapConsumerEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
java.lang.String |
getAddress() |
SnmpMarshalerSupport |
getMarshaler() |
org.snmp4j.Snmp |
getSnmp() |
boolean |
isEnabled() |
void |
process(javax.jbi.messaging.MessageExchange exchange) |
void |
processPdu(org.snmp4j.CommandResponderEvent event) |
void |
setAddress(java.lang.String address)
Specifies the connection URI used to connect to a snmp capable device.
|
void |
setEnabled(boolean enabled)
Specifies wether the endpoint is enabled or not.
|
void |
setMarshaler(SnmpMarshalerSupport marshaler)
Specifies a marshaler class which provides the logic for converting
a snmp trap into a normalized message.
|
void |
start() |
void |
stop() |
void |
validate() |
configureExchangeTarget, deactivate, getLocationURI, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUridone, fail, getChannel, getContext, getExchangeFactory, send, sendSyncgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic static final boolean DEFAULT_ENABLED_VALUE
public void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class ConsumerEndpointjava.lang.Exceptionpublic void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exceptionpublic void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class ConsumerEndpointjavax.jbi.management.DeploymentExceptionpublic void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class AbstractEndpointjava.lang.Exceptionpublic void processPdu(org.snmp4j.CommandResponderEvent event)
processPdu in interface org.snmp4j.CommandResponderpublic org.snmp4j.Snmp getSnmp()
public 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 |
listenAddress - a String value containing the connection detailspublic SnmpMarshalerSupport getMarshaler()
public void setMarshaler(SnmpMarshalerSupport marshaler)
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.
marshaler - a class which implements SnmpMarshalerSupportpublic boolean isEnabled()
public void setEnabled(boolean enabled)
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.
enabled - the enabled to setCopyright © 2005-2014 FuseSource. All Rights Reserved.