51.2. Interface Definition

package javax.jms;
public interface TopicPublisher extends MessageProducer {
   Topic getTopic() throws JMSException;
   void publish(Message message) throws JMSException;
   void publish(Message message, int deliveryMode, int priority,
                               long timeToLive) throws JMSException;
   void publish(Topic topic, Message message) throws  JMSException;
   void publish(Topic topic, Message message, int deliveryMode,
                                      int priority, long timeToLive)
                                                 throws JMSException;
}

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.