jms4spread
Class TopicPublisher

java.lang.Object
  |
  +--jms4spread.MessageProducer
        |
        +--jms4spread.TopicPublisher

public class TopicPublisher
extends MessageProducer

A client uses a TopicPublisher to publish a Topic


Method Summary
 Topic getTopic()
          Get the topic associated with the TopicPublisher
 void publish(Message message)
          Publishes a Message
 void publish(Message message, int deliveryMode, int priority, long timeToLive)
          Publishes a Message
 void publish(Topic topic, Message message)
          Publishes a Message to a given topic
 void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive)
          Publishes a Message to a given topic
 
Methods inherited from class jms4spread.MessageProducer
close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTopic

public Topic getTopic()
Get the topic associated with the TopicPublisher
Returns:
the topic associated with the TopicPublisher

publish

public void publish(Message message)
             throws JMSException
Publishes a Message
Parameters:
message - the message to be published
Throws:
JMSException - due to an internal error

publish

public void publish(Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Publishes a Message
Parameters:
message - the message to be published
deliveryMode - the deliveryMode of the message
prioriy - the prioriy of the message
timeToLive - the time to live of the message
Throws:
JMSException - due to an internal error

publish

public void publish(Topic topic,
                    Message message)
             throws JMSException
Publishes a Message to a given topic
Parameters:
message - the message to be published
topic - the topic to publish the message to
Throws:
JMSException - due to an internal error

publish

public void publish(Topic topic,
                    Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Publishes a Message to a given topic
Parameters:
message - the message to be published
topic - the topic to publish the message to
deliveryMode - the deliveryMode of the message
prioriy - the prioriy of the message
timeToLive - the time to live of the message
Throws:
JMSException - due to an internal error