public class SubscriptionManager
extends java.lang.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.
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.commons.logging.Log |
log
Logger
|
private MessengerManager |
manager
The JMS connections
|
private javax.servlet.ServletContext |
servletContext
The context passed into MDOs
|
private SubscriptionList |
subscriptionList
The JMS Subscriptions
|
private boolean |
useStopWatch
Should we use a stopwatch to output performance metrics
|
| Constructor and Description |
|---|
SubscriptionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected Messenger |
getMessenger(java.lang.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
|
private static final org.apache.commons.logging.Log log
private MessengerManager manager
private SubscriptionList subscriptionList
private javax.servlet.ServletContext servletContext
private boolean useStopWatch
protected void subscribe()
throws javax.jms.JMSException,
javax.servlet.ServletException
javax.jms.JMSExceptionjavax.servlet.ServletExceptionpublic void subscribe(Subscription subscription) throws javax.jms.JMSException, javax.servlet.ServletException
javax.jms.JMSExceptionjavax.servlet.ServletExceptionpublic void unsubscribe()
throws javax.jms.JMSException,
javax.servlet.ServletException
javax.jms.JMSExceptionjavax.servlet.ServletExceptionpublic void unsubscribe(Subscription subscription) throws javax.jms.JMSException, javax.servlet.ServletException
javax.jms.JMSExceptionjavax.servlet.ServletExceptionpublic MessengerManager getMessengerManager() throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void setMessengerManager(MessengerManager manager)
public SubscriptionList getSubscriptionList()
public void setSubscriptionList(SubscriptionList subscriptionList)
subscriptionList - The subscriptionList to setpublic javax.servlet.ServletContext getServletContext()
public void setServletContext(javax.servlet.ServletContext servletContext)
servletContext - The servletContext to setprotected javax.jms.MessageListener wrapInStopWatch(javax.jms.MessageListener listener)
protected Messenger getMessenger(java.lang.String name) throws javax.jms.JMSException
javax.jms.JMSException