org.apache.axis2.transport.jms
Class SimpleJMSListener

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

public class SimpleJMSListener
extends Object
implements javax.jms.MessageListener, TransportListener

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 interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, 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()
           
 EndpointReference getEPRForService(String serviceName, String ip)
           
 HashMap getProperties()
           
 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 interface 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 interface TransportListener

stop

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

getConfigurationContext

public ConfigurationContext getConfigurationContext()

getConnector

protected JMSConnector getConnector()

getProperties

public HashMap getProperties()

getEPRForService

public EndpointReference getEPRForService(String serviceName,
                                          String ip)
                                   throws AxisFault
Specified by:
getEPRForService in interface TransportListener
Throws:
AxisFault