org.apache.axis2.transport.jms
Class SimpleJMSListener

java.lang.Object
  extended byorg.apache.axis2.transport.TransportListener
      extended byorg.apache.axis2.transport.jms.SimpleJMSListener
All Implemented Interfaces:
javax.jms.MessageListener

public class SimpleJMSListener
extends TransportListener
implements javax.jms.MessageListener

SimpleJMSListener implements the javax.jms.MessageListener interface. Its basic purpose is listen asynchronously for messages and to pass them off to SimpleJMSWorker for processing.

Note: This is a simple JMS listener that does not pool worker threads and is not otherwise tuned for performance. As such, its intended use is not for production code, but for demos, debugging, and performance profiling.


Field Summary
protected  ConfigurationContext configurationContext
           
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.apache.axis2.transport.TransportListener
PARAM_PORT
 
Constructor Summary
SimpleJMSListener()
           
SimpleJMSListener(String repositoryDirectory, HashMap connectorMap, HashMap cfMap, String destination, String username, String password, boolean doThreads)
           
 
Method Summary
static HashMap createCFMap(OptionsParser optionsParser)
           
static HashMap createConnectorMap(OptionsParser optionsParser)
           
 ConfigurationContext getConfigurationContext()
           
protected  JMSConnector getConnector()
           
 HashMap getProperties()
           
 EndpointReference getReplyToEPR(String serviceName)
           
 void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
           
static void main(String[] args)
           
 void onMessage(javax.jms.Message message)
          This method is called asynchronously whenever a message arrives.
static void printUsage()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

configurationContext

protected ConfigurationContext configurationContext
Constructor Detail

SimpleJMSListener

public SimpleJMSListener()

SimpleJMSListener

public SimpleJMSListener(String repositoryDirectory,
                         HashMap connectorMap,
                         HashMap cfMap,
                         String destination,
                         String username,
                         String password,
                         boolean doThreads)
                  throws Exception
Method Detail

createCFMap

public static final HashMap createCFMap(OptionsParser optionsParser)
                                 throws IOException
Throws:
IOException

createConnectorMap

public static final HashMap createConnectorMap(OptionsParser optionsParser)

init

public void init(ConfigurationContext axisConf,
                 TransportInDescription transprtIn)
          throws AxisFault
Specified by:
init in class TransportListener
Throws:
AxisFault

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

onMessage

public void onMessage(javax.jms.Message message)
This method is called asynchronously whenever a message arrives.

Specified by:
onMessage in interface javax.jms.MessageListener
Parameters:
message -

printUsage

public static void printUsage()

start

public void start()
Specified by:
start in class TransportListener

stop

public void stop()
          throws AxisFault
Specified by:
stop in class TransportListener
Throws:
AxisFault

getConfigurationContext

public ConfigurationContext getConfigurationContext()

getConnector

protected JMSConnector getConnector()

getProperties

public HashMap getProperties()

getReplyToEPR

public EndpointReference getReplyToEPR(String serviceName)
                                throws AxisFault
Specified by:
getReplyToEPR in class TransportListener
Throws:
AxisFault