org.jboss.soa.esb.listeners.gateway
Class JmsGatewayListener

java.lang.Object
  extended by org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
      extended by org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle
          extended by org.jboss.soa.esb.listeners.gateway.JmsGatewayListener
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, ManagedLifecycle

public class JmsGatewayListener
extends AbstractThreadedManagedLifecycle

See Also:
Serialized Form

Field Summary
protected  java.lang.Object _composer
           
protected  java.lang.Class _composerClass
           
protected  java.lang.String _composerName
           
protected  ConfigTree _config
           
protected static org.apache.log4j.Logger _logger
           
protected  java.lang.String _messageSelector
           
protected  EPR _myEpr
           
protected  java.lang.reflect.Method _processMethod
           
protected  java.lang.String _serviceCategory
           
protected  ServiceInvoker _serviceInvoker
           
protected  java.lang.String _serviceName
           
protected  java.lang.String _targetServiceCategory
           
protected  java.lang.String _targetServiceName
           
protected  org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool jmsConnectionPool
           
protected  javax.jms.Destination jmsDestination
           
protected  java.lang.String jmsDestinationName
           
protected  javax.jms.MessageConsumer jmsMessageConsumer
           
protected  org.jboss.internal.soa.esb.rosetta.pooling.JmsSession jmsSession
           
 
Fields inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
PARAM_TERMINATION_PERIOD
 
Constructor Summary
JmsGatewayListener(ConfigTree listenerConfig)
           
 
Method Summary
protected  void checkMyParms()
          Check for mandatory and optional attributes in parameter tree
protected  void doInitialise()
          Handle the initialisation of the managed instance.
protected  void doRun()
          Execute on the thread.
protected  void doThreadedDestroy()
          Handle the threaded destroy of the managed instance.
protected  javax.jms.Message receiveOne()
          Receive one message and retry if connection
protected  void resolveComposerClass()
           
 
Methods inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle
addManagedLifecycleThreadEventListener, doDestroy, doStart, doStop, isRunning, isStopped, isStopping, removeManagedLifecycleThreadEventListener, run, setRunning, waitForRunningStateChange, waitUntilStopped, waitUntilStopped, waitUntilStopping
 
Methods inherited from class org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle
addManagedLifecycleEventListener, changeState, destroy, getConfig, getState, getTerminationPeriod, initialise, removeManagedLifecycleEventListener, start, stop, waitUntilDestroyed, waitUntilDestroyed, waitUntilNotState, waitUntilState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected static final org.apache.log4j.Logger _logger

jmsDestinationName

protected java.lang.String jmsDestinationName

jmsSession

protected org.jboss.internal.soa.esb.rosetta.pooling.JmsSession jmsSession

jmsDestination

protected javax.jms.Destination jmsDestination

jmsMessageConsumer

protected javax.jms.MessageConsumer jmsMessageConsumer

_messageSelector

protected java.lang.String _messageSelector

_config

protected ConfigTree _config

_serviceCategory

protected java.lang.String _serviceCategory

_serviceName

protected java.lang.String _serviceName

_targetServiceCategory

protected java.lang.String _targetServiceCategory

_targetServiceName

protected java.lang.String _targetServiceName

_myEpr

protected EPR _myEpr

_serviceInvoker

protected ServiceInvoker _serviceInvoker

_composerName

protected java.lang.String _composerName

_composerClass

protected java.lang.Class _composerClass

_composer

protected java.lang.Object _composer

_processMethod

protected java.lang.reflect.Method _processMethod

jmsConnectionPool

protected org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool jmsConnectionPool
Constructor Detail

JmsGatewayListener

public JmsGatewayListener(ConfigTree listenerConfig)
                   throws ConfigurationException
Throws:
ConfigurationException
Method Detail

doInitialise

protected void doInitialise()
                     throws ManagedLifecycleException
Handle the initialisation of the managed instance.

Specified by:
doInitialise in class AbstractManagedLifecycle
Throws:
ManagedLifecycleException - for errors while initialisation.

doRun

protected void doRun()
Execute on the thread.

Specified by:
doRun in class AbstractThreadedManagedLifecycle

doThreadedDestroy

protected void doThreadedDestroy()
                          throws ManagedLifecycleException
Handle the threaded destroy of the managed instance.

Overrides:
doThreadedDestroy in class AbstractThreadedManagedLifecycle
Throws:
ManagedLifecycleException - for errors while destroying.

checkMyParms

protected void checkMyParms()
                     throws ConfigurationException
Check for mandatory and optional attributes in parameter tree

Throws:
ConfigurationException - - if mandatory atts are not right or actionClass not in classpath

resolveComposerClass

protected void resolveComposerClass()
                             throws ConfigurationException
Throws:
ConfigurationException

receiveOne

protected javax.jms.Message receiveOne()
Receive one message and retry if connection

Returns:
javax.jms.Message - One input message, or null