1 45 package org.exolab.jms.client; 46 47 import javax.jms.JMSException ; 48 import javax.jms.Message ; 49 import javax.jms.Topic ; 50 import javax.jms.TopicPublisher ; 51 52 53 60 class JmsTopicPublisher 61 extends JmsMessageProducer 62 implements TopicPublisher { 63 64 70 public JmsTopicPublisher(JmsSession session, JmsTopic topic) { 71 super(session, topic); 72 } 73 74 80 public Topic getTopic() { 81 return (Topic ) getDestination(); 82 } 83 84 91 public void publish(Message message) throws JMSException { 92 publish(getTopic(), message, getDeliveryMode(), getPriority(), 93 getTimeToLive()); 94 } 95 96 104 public void publish(Topic topic, Message message) throws JMSException { 105 publish(topic, message, getDeliveryMode(), getPriority(), 106 getTimeToLive()); 107 } 108 109 119 public void publish(Message message, int deliveryMode, int priority, 120 long timeToLive) throws JMSException { 121 publish(getTopic(), message, deliveryMode, priority, timeToLive); 122 } 123 124 135 public void publish(Topic topic, Message message, int deliveryMode, 136 int priority, long timeToLive) throws JMSException { 137 send(topic, message, deliveryMode, priority, timeToLive); 138 } 139 140 } 141 | Popular Tags |