This project has retired. For details please refer to its
Attic page .
AbstractMessagePublisher (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.components.jms
Class AbstractMessagePublisher
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.jms.AbstractMessagePublisher
All Implemented Interfaces: Disposable , Initializable , LogEnabled , Parameterizable , Serviceable , JMSConnectionEventListener
Direct Known Subclasses: JMSPublisherAction
public abstract class AbstractMessagePublisher extends AbstractLogEnabled implements Serviceable , Parameterizable , Initializable , Disposable , JMSConnectionEventListener
Abstract JMS message publisher. Use this as a basis for components
that want to publish JMS messages.
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
yes
Name of the connection registered with
JMSConnectionManager
.
This must be a topic connection.
topic
yes
The name of the topic to publish messages to.
priority
no
4
the priority of the published messages
time-to-live
no
10000
the message's lifetime in milliseconds
persistent-delivery
no
false
whether to use persistent delivery mode when publishing messages
Version:
CVS $Id: AbstractMessagePublisher.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_session
protected TopicSession m_session
m_publisher
protected TopicPublisher m_publisher
m_mode
protected int m_mode
m_priority
protected int m_priority
m_timeToLive
protected int m_timeToLive
m_topicName
protected String m_topicName
m_acknowledgeMode
protected int m_acknowledgeMode
m_connectionName
protected String m_connectionName
AbstractMessagePublisher
public AbstractMessagePublisher ()
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
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.
publishMessage
protected void publishMessage (Message message)
throws JMSException
Concrete classes call this method to publish messages.
Throws:
JMSException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.