1 18 package org.apache.activemq.pool; 19 20 import org.apache.activemq.ActiveMQTopicPublisher; 21 22 import javax.jms.Destination ; 23 import javax.jms.JMSException ; 24 import javax.jms.Message ; 25 import javax.jms.Topic ; 26 import javax.jms.TopicPublisher ; 27 28 31 public class PooledTopicPublisher extends PooledProducer implements TopicPublisher { 32 33 public PooledTopicPublisher(ActiveMQTopicPublisher messageProducer, Destination destination) throws JMSException { 34 super(messageProducer, destination); 35 } 36 37 public Topic getTopic() throws JMSException { 38 return getTopicPublisher().getTopic(); 39 } 40 41 public void publish(Message message) throws JMSException { 42 getTopicPublisher().publish((Topic ) getDestination(), message); 43 } 44 45 public void publish(Message message, int i, int i1, long l) throws JMSException { 46 getTopicPublisher().publish((Topic ) getDestination(), message, i, i1, l); 47 } 48 49 public void publish(Topic topic, Message message) throws JMSException { 50 getTopicPublisher().publish(topic, message); 51 } 52 53 public void publish(Topic topic, Message message, int i, int i1, long l) throws JMSException { 54 getTopicPublisher().publish(topic, message, i, i1, l); 55 } 56 57 protected ActiveMQTopicPublisher getTopicPublisher() { 58 return (ActiveMQTopicPublisher) getMessageProducer(); 59 } 60 } 61 | Popular Tags |