org.ow2.jasmine.interfaces.snmp
Class SNMPResourceAdapter

java.lang.Object
  extended by org.ow2.jasmine.interfaces.snmp.SNMPResourceAdapter
All Implemented Interfaces:
javax.resource.spi.ResourceAdapter

public class SNMPResourceAdapter
extends Object
implements javax.resource.spi.ResourceAdapter

This class implements a connector to provide SNMP communications.

Author:
Laurent RUAUD
See Also:
SNMPAgent

Constructor Summary
SNMPResourceAdapter()
           
 
Method Summary
 void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory arg0, javax.resource.spi.ActivationSpec arg1)
          Not used
 void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory arg0, javax.resource.spi.ActivationSpec arg1)
          Not used
 XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] arg0)
          Not used
 void setIncomingRequestAddress(String incomingRequestAddress)
          Defines the ip address of incoming requests.
 void setIncomingRequestPort(String incomingRequestPort)
          Defines the port of incoming requests.
 void setTrapDestinationAddress(String trapDestinationAddress)
          Defines ip addresses for traps destination.
 void setTrapDestinationPort(String trapDestinationPort)
          Defines the port of traps destination.
 void start(javax.resource.spi.BootstrapContext arg0)
          This is called when the resource adapter instance is bootstrapped.
 void stop()
          This is called when the resource adapter instance is undeployed or during application server shutdown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SNMPResourceAdapter

public SNMPResourceAdapter()
Method Detail

start

public void start(javax.resource.spi.BootstrapContext arg0)
           throws javax.resource.spi.ResourceAdapterInternalException
This is called when the resource adapter instance is bootstrapped. It initiates the singleton instance of SNMP agent and registers MIB of external interfaces.

Specified by:
start in interface javax.resource.spi.ResourceAdapter
Throws:
javax.resource.spi.ResourceAdapterInternalException

stop

public void stop()
This is called when the resource adapter instance is undeployed or during application server shutdown. It makes the SNMP agent unregister all registered MIBs.

Specified by:
stop in interface javax.resource.spi.ResourceAdapter

setIncomingRequestAddress

public void setIncomingRequestAddress(String incomingRequestAddress)
Defines the ip address of incoming requests.

Parameters:
incomingRequestAddress - the ip address of incoming requests.

setIncomingRequestPort

public void setIncomingRequestPort(String incomingRequestPort)
Defines the port of incoming requests.

Parameters:
incomingRequestPort - the port of incoming requests.

setTrapDestinationAddress

public void setTrapDestinationAddress(String trapDestinationAddress)
Defines ip addresses for traps destination. Several addresses can be defined as a comma-separated list.

Parameters:
trapDestinationAddress - an ip address for traps destination.

setTrapDestinationPort

public void setTrapDestinationPort(String trapDestinationPort)
Defines the port of traps destination.

Parameters:
trapDestinationPort - the port of traps destination.

endpointActivation

public void endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory arg0,
                               javax.resource.spi.ActivationSpec arg1)
                        throws javax.resource.ResourceException
Not used

Specified by:
endpointActivation in interface javax.resource.spi.ResourceAdapter
Parameters:
arg0 - Not used
arg1 - Not used
Throws:
javax.resource.ResourceException

endpointDeactivation

public void endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory arg0,
                                 javax.resource.spi.ActivationSpec arg1)
Not used

Specified by:
endpointDeactivation in interface javax.resource.spi.ResourceAdapter
Parameters:
arg0 - Not used
arg1 - Not used

getXAResources

public XAResource[] getXAResources(javax.resource.spi.ActivationSpec[] arg0)
                            throws javax.resource.ResourceException
Not used

Specified by:
getXAResources in interface javax.resource.spi.ResourceAdapter
Parameters:
arg0 - Not used
Throws:
javax.resource.ResourceException


Copyright © 2013 OW2 Consortium. All Rights Reserved.