org.apache.commons.messagelet
Class Main

java.lang.Object
  extended by org.apache.commons.messagelet.Main

public class Main
extends java.lang.Object

Main is a simple command line program that will create a number of subscriptions and consume messages using just regular MDO and MessageListener classes.

Version:
$Revision: 155459 $
Author:
James Strachan

Field Summary
private  java.lang.String connectionsConfig
          The URI that connections are loaded from
private static org.apache.commons.logging.Log log
          Logger
private  MessengerManager manager
          The JMS connections
private  SubscriptionList subscriptionList
          The JMS Subscriptions
private  java.lang.String subscriptionsConfig
          The URI where subscriptions are loaded from
private  boolean useStopWatch
          Should we use a stopwatch to output performance metrics
 
Constructor Summary
Main()
           
 
Method Summary
protected  MessengerManager createMessengerManager()
           
protected  SubscriptionList createSubscriptionList()
           
 java.lang.String getConnectionsConfig()
           
 Messenger getMessenger(java.lang.String name)
           
 MessengerManager getMessengerManager()
           
protected  javax.servlet.ServletContext getServletContext()
           
 java.lang.String getSubscriptionsConfig()
           
static void main(java.lang.String[] args)
           
 void run()
          Starts all the JMS connections and consumes JMS messages, passing them onto the MessageListener and Message Driven Objects
 void setConnectionsConfig(java.lang.String connectionsConfig)
           
 void setMessengerManager(MessengerManager manager)
           
 void setSubscriptionsConfig(java.lang.String subscriptionsConfig)
           
protected  void waitForever()
          This method blocks the current thread indefinitely until the JVM is terminated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Logger


manager

private MessengerManager manager
The JMS connections


subscriptionList

private SubscriptionList subscriptionList
The JMS Subscriptions


connectionsConfig

private java.lang.String connectionsConfig
The URI that connections are loaded from


subscriptionsConfig

private java.lang.String subscriptionsConfig
The URI where subscriptions are loaded from


useStopWatch

private boolean useStopWatch
Should we use a stopwatch to output performance metrics

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(java.lang.String[] args)

run

public void run()
         throws java.lang.Exception
Starts all the JMS connections and consumes JMS messages, passing them onto the MessageListener and Message Driven Objects

Throws:
java.lang.Exception

getMessenger

public Messenger getMessenger(java.lang.String name)
                       throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getConnectionsConfig

public java.lang.String getConnectionsConfig()

setConnectionsConfig

public void setConnectionsConfig(java.lang.String connectionsConfig)

getSubscriptionsConfig

public java.lang.String getSubscriptionsConfig()

setSubscriptionsConfig

public void setSubscriptionsConfig(java.lang.String subscriptionsConfig)

getMessengerManager

public MessengerManager getMessengerManager()
                                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException

setMessengerManager

public void setMessengerManager(MessengerManager manager)

createMessengerManager

protected MessengerManager createMessengerManager()
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createSubscriptionList

protected SubscriptionList createSubscriptionList()
                                           throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getServletContext

protected javax.servlet.ServletContext getServletContext()

waitForever

protected void waitForever()
This method blocks the current thread indefinitely until the JVM is terminated.