org.apache.commons.messagelet
Class SubscriptionManager

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

public class SubscriptionManager
extends Object

SubscriptionManager 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

Constructor Summary
SubscriptionManager()
           
 
Method Summary
protected  Messenger getMessenger(String name)
           
 MessengerManager getMessengerManager()
           
 javax.servlet.ServletContext getServletContext()
          Returns the servletContext.
 SubscriptionList getSubscriptionList()
          Returns the subscriptionList.
 void setMessengerManager(MessengerManager manager)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
          Sets the servletContext.
 void setSubscriptionList(SubscriptionList subscriptionList)
          Sets the subscriptionList.
protected  void subscribe()
           
 void subscribe(Subscription subscription)
           
 void unsubscribe()
           
 void unsubscribe(Subscription subscription)
           
protected  javax.jms.MessageListener wrapInStopWatch(javax.jms.MessageListener listener)
          Allows the MessageListener to be wrapped inside a stop watch message listener if required
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionManager

public SubscriptionManager()
Method Detail

subscribe

protected void subscribe()
                  throws javax.jms.JMSException,
                         javax.servlet.ServletException
Throws:
javax.jms.JMSException
javax.servlet.ServletException

subscribe

public void subscribe(Subscription subscription)
               throws javax.jms.JMSException,
                      javax.servlet.ServletException
Throws:
javax.jms.JMSException
javax.servlet.ServletException

unsubscribe

public void unsubscribe()
                 throws javax.jms.JMSException,
                        javax.servlet.ServletException
Throws:
javax.jms.JMSException
javax.servlet.ServletException

unsubscribe

public void unsubscribe(Subscription subscription)
                 throws javax.jms.JMSException,
                        javax.servlet.ServletException
Throws:
javax.jms.JMSException
javax.servlet.ServletException

getMessengerManager

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

setMessengerManager

public void setMessengerManager(MessengerManager manager)

getSubscriptionList

public SubscriptionList getSubscriptionList()
Returns the subscriptionList.

Returns:
SubscriptionList

setSubscriptionList

public void setSubscriptionList(SubscriptionList subscriptionList)
Sets the subscriptionList.

Parameters:
subscriptionList - The subscriptionList to set

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns the servletContext.

Returns:
ServletContext

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Sets the servletContext.

Parameters:
servletContext - The servletContext to set

wrapInStopWatch

protected javax.jms.MessageListener wrapInStopWatch(javax.jms.MessageListener listener)
Allows the MessageListener to be wrapped inside a stop watch message listener if required


getMessenger

protected Messenger getMessenger(String name)
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.