cgl.narada.jms
Class JmsTopicPublisher
java.lang.Object
cgl.narada.jms.JmsMessageProducer
cgl.narada.jms.JmsTopicPublisher
- All Implemented Interfaces:
- JmsDebugFlags, MessageProducer, TopicPublisher
public class JmsTopicPublisher
- extends JmsMessageProducer
- implements TopicPublisher, JmsDebugFlags
A client uses a TopicPublisher object to publish messages on a topic. A
TopicPublisher object is the publish-subscribe form of a message producer.
Normally, the Topic is specified when a TopicPublisher is created. In this
case, an attempt to use the publish methods for an unidentified
TopicPublisher will throw a java.lang.UnsupportedOperationException
.
If the TopicPublisher is created with an unidentified Topic, an attempt
to use the publish methods that assume that the Topic has been identified
will throw a java.lang.UnsupportedOperationException.
The following message headers are set as part of publishing a message:
JMSDestination, JMSDeliveryMode, JMSExpiration, JMSPriority,
JMSMessageID and JMSTimeStamp.
| Fields inherited from interface cgl.narada.jms.JmsDebugFlags |
JmsConnection_Debug, JmsDestination_Debug, JmsHeader_Debug, JmsLogger_Debug, JmsMessage_Debug, JmsObjectMessage_Debug, JmsProperties_Debug, JmsTextMessage_Debug, JmsTopic_Debug, JmsTopicAndSelectorVerifier_Debug, JmsTopicConnection_Debug, JmsTopicConnectionFactory_Debug, JmsTopicPublisher_Debug, JmsTopicSession_Debug, JmsTopicSubscriber_Debug |
| Methods inherited from class cgl.narada.jms.JmsMessageProducer |
close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jms.MessageProducer |
close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive |
JmsTopicPublisher
public JmsTopicPublisher(JmsTopicSession jmsTopicSession,
Topic topic)
- Created in JmsTopicSession
getTopic
public Topic getTopic()
throws JMSException
- Gets the topic associated with this TopicPublisher.
- Specified by:
getTopic in interface TopicPublisher
- Returns:
- this publisher's topic
- Throws:
JMSException - - if the JMS provider fails to get the topic
for this TopicPublisher due to some internal error.
publish
public void publish(Message message)
throws JMSException
- Specified by:
publish in interface TopicPublisher
- Throws:
JMSException
publish
public void publish(Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
- Specified by:
publish in interface TopicPublisher
- Throws:
JMSException
publish
public void publish(Topic newTopic,
Message message)
throws JMSException
- Specified by:
publish in interface TopicPublisher
- Throws:
JMSException
publish
public void publish(Topic newTopic,
Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
- Specified by:
publish in interface TopicPublisher
- Throws:
JMSException
For comments and suggestions please send
e-mail to
The NaradaBrokering Project