1 24 package com.scalagent.kjoram; 25 26 import com.scalagent.kjoram.excepts.IllegalStateException; 27 import com.scalagent.kjoram.excepts.JMSException; 28 29 30 public class TopicSubscriber extends MessageConsumer 31 { 32 45 TopicSubscriber(Session sess, Topic topic, String name, String selector, 46 boolean noLocal) throws JMSException 47 { 48 super(sess, topic, selector, name, noLocal); 49 } 50 51 52 public String toString() 53 { 54 return "TopicSub:" + targetName; 55 } 56 57 58 63 public boolean getNoLocal() throws JMSException 64 { 65 if (closed) 66 throw new IllegalStateException ("Forbidden call on a closed" 67 + " subscriber."); 68 return noLocal; 69 } 70 71 76 public Topic getTopic() throws JMSException 77 { 78 if (closed) 79 throw new IllegalStateException ("Forbidden call on a closed" 80 + " subscriber."); 81 return (Topic) dest; 82 } 83 } 84 | Popular Tags |