1 24 package org.objectweb.joram.client.jms; 25 26 import javax.jms.IllegalStateException ; 27 import javax.jms.JMSException ; 28 29 32 public class TopicPublisher extends MessageProducer 33 implements javax.jms.TopicPublisher 34 { 35 44 TopicPublisher(TopicSession sess, Destination topic) throws JMSException { 45 super(sess, topic); 46 } 47 48 49 public String toString() 50 { 51 return "TopicPub:" + sess.getId(); 52 } 53 54 59 public javax.jms.Topic getTopic() throws JMSException 60 { 61 if (closed) 62 throw new IllegalStateException ("Forbidden call on a closed publisher."); 63 64 return (javax.jms.Topic ) super.dest; 65 } 66 67 74 public void publish(javax.jms.Message message, int deliveryMode, 75 int priority, long timeToLive) throws JMSException 76 { 77 super.send(message, deliveryMode, priority, timeToLive); 78 } 79 80 87 public void publish(javax.jms.Message message) throws JMSException 88 { 89 super.send(message); 90 } 91 92 99 public void publish(javax.jms.Topic topic, javax.jms.Message message) 100 throws JMSException 101 { 102 super.send(topic, message); 103 } 104 105 112 public void publish(javax.jms.Topic topic, javax.jms.Message message, 113 int deliveryMode, int priority, 114 long timeToLive) throws JMSException 115 { 116 super.send(topic, message, deliveryMode, priority, timeToLive); 117 } 118 } 119 | Popular Tags |