This project has retired. For details please refer to its
Attic page .
AbstractMessageListener (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.components.jms
Class AbstractMessageListener
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.jms.AbstractMessageListener
All Implemented Interfaces: MessageListener , Disposable , Initializable , LogEnabled , Parameterizable , Serviceable , JMSConnectionEventListener
Direct Known Subclasses: JMSEventMessageListener
public abstract class AbstractMessageListener extends AbstractLogEnabled implements MessageListener , Serviceable , Parameterizable , Initializable , Disposable , JMSConnectionEventListener
Abstract MessageListener
implementation.
Use this as a basis for concrete MessageListener implementations.
When used in conjunction with the default JMSConnectionManager
implementation this class supports automatic reconnection when the connection gets severed.
Parameters:
parameter
required/default
description
connection
required
Name of the connection registered with
JMSConnectionManager
.
This must be a topic connection.
topic
required
The name of the topic to subscribe to.
subscription-id
(null
)
An optional durable subscription id.
message-selector
(null
)
An optional message selector.
Version:
CVS $Id: AbstractMessageListener.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
m_manager
protected ServiceManager m_manager
m_connectionName
protected String m_connectionName
m_topicName
protected String m_topicName
m_subscriptionId
protected String m_subscriptionId
m_selector
protected String m_selector
m_acknowledgeMode
protected int m_acknowledgeMode
AbstractMessageListener
public AbstractMessageListener ()
service
public void service (ServiceManager manager)
throws ServiceException
Specified by: service
in interface Serviceable
Throws:
ServiceException
parameterize
public void parameterize (Parameters parameters)
throws ParameterException
Specified by: parameterize
in interface Parameterizable
Throws:
ParameterException
initialize
public void initialize ()
throws Exception
Registers this MessageListener as a TopicSubscriber to the configured Topic.
Specified by: initialize
in interface Initializable
Throws:
Exception
dispose
public void dispose ()
Specified by: dispose
in interface Disposable
onConnection
public void onConnection (String name)
Description copied from interface: JMSConnectionEventListener
Called when a JMS connection has been established.
Specified by: onConnection
in interface JMSConnectionEventListener
Parameters: name
- the name of the JMS connection.
onDisconnection
public void onDisconnection (String name)
Description copied from interface: JMSConnectionEventListener
Called when a JMS connection is being disconnected.
Specified by: onDisconnection
in interface JMSConnectionEventListener
Parameters: name
- the name of the JMS connection.
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.