com.caucho.jms.connection
Class TopicPublisherImpl

java.lang.Object
  extended by com.caucho.jms.connection.MessageProducerImpl
      extended by com.caucho.jms.connection.TopicPublisherImpl
All Implemented Interfaces:
MessageProducer, TopicPublisher

public class TopicPublisherImpl
extends MessageProducerImpl
implements TopicPublisher

A basic topic.


Field Summary
 
Fields inherited from class com.caucho.jms.connection.MessageProducerImpl
_queue, _session, DEFAULT_TIME_TO_LIVE
 
Constructor Summary
TopicPublisherImpl(JmsSession session, AbstractTopic topic)
           
 
Method Summary
 Topic getTopic()
          Returns the topic
 void publish(Message message)
          Publishes a message to the topic
 void publish(Message message, int deliveryMode, int priority, long timeToLive)
          Publishes a message to the topic
 void publish(Topic topic, Message message)
          Publishes a message to the topic
 void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive)
          Publishes a message to the topic
 
Methods inherited from class com.caucho.jms.connection.MessageProducerImpl
calculateExpiration, close, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.MessageProducer
close, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
 

Constructor Detail

TopicPublisherImpl

public TopicPublisherImpl(JmsSession session,
                          AbstractTopic topic)
Method Detail

getTopic

public Topic getTopic()
               throws JMSException
Returns the topic

Specified by:
getTopic in interface TopicPublisher
Throws:
JMSException

publish

public void publish(Message message)
             throws JMSException
Publishes a message to the topic

Specified by:
publish in interface TopicPublisher
Parameters:
message - the message to publish
Throws:
JMSException

publish

public void publish(Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Publishes a message to the topic

Specified by:
publish in interface TopicPublisher
Parameters:
message - the message to publish
deliveryMode - the delivery mode
priority - the priority
timeToLive - how long the message should live
Throws:
JMSException

publish

public void publish(Topic topic,
                    Message message)
             throws JMSException
Publishes a message to the topic

Specified by:
publish in interface TopicPublisher
Parameters:
topic - the topic the message should be publish to
message - the message to publish
Throws:
JMSException

publish

public void publish(Topic topic,
                    Message message,
                    int deliveryMode,
                    int priority,
                    long timeToLive)
             throws JMSException
Publishes a message to the topic

Specified by:
publish in interface TopicPublisher
Parameters:
topic - the topic the message should be publish to
message - the message to publish
deliveryMode - the delivery mode
priority - the priority
timeToLive - how long the message should live
Throws:
JMSException