1 18 19 package org.apache.activemq; 20 21 import org.apache.activemq.command.ActiveMQDestination; 22 23 import javax.jms.Destination ; 24 import javax.jms.InvalidDestinationException ; 25 import javax.jms.JMSException ; 26 import javax.jms.Message ; 27 import javax.jms.MessageFormatException ; 28 import javax.jms.Session ; 29 import javax.jms.Topic ; 30 import javax.jms.TopicPublisher ; 31 import javax.jms.TopicSession ; 32 33 89 90 public class ActiveMQTopicPublisher extends ActiveMQMessageProducer implements 91 TopicPublisher { 92 93 protected ActiveMQTopicPublisher(ActiveMQSession session, 94 ActiveMQDestination destination) throws JMSException { 95 super(session, session.getNextProducerId(), destination); 96 } 97 98 105 106 public Topic getTopic() throws JMSException { 107 return (Topic ) super.getDestination(); 108 } 109 110 127 128 public void publish(Message message) throws JMSException { 129 super.send(message); 130 } 131 132 149 150 public void publish(Message message, int deliveryMode, int priority, 151 long timeToLive) throws JMSException { 152 super.send(message, deliveryMode, priority, timeToLive); 153 } 154 155 175 176 public void publish(Topic topic, Message message) throws JMSException { 177 super.send(topic, message); 178 } 179 180 199 200 public void publish(Topic topic, Message message, int deliveryMode, 201 int priority, long timeToLive) throws JMSException { 202 super.send(topic, message, deliveryMode, priority, timeToLive); 203 } 204 } 205 | Popular Tags |