Package org.objectweb.joram.client.jms
Class TopicSubscriber
- java.lang.Object
-
- org.objectweb.joram.client.jms.MessageConsumer
-
- org.objectweb.joram.client.jms.TopicSubscriber
-
- All Implemented Interfaces:
AutoCloseable,MessageConsumer,TopicSubscriber
public class TopicSubscriber extends MessageConsumer implements TopicSubscriber
Implements thejavax.jms.TopicSubscriberinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.objectweb.joram.client.jms.MessageConsumer
MessageConsumer.Closer
-
-
Field Summary
-
Fields inherited from class org.objectweb.joram.client.jms.MessageConsumer
dest, noLocal, queueMode, selector, sess, targetName
-
-
Constructor Summary
Constructors Constructor Description TopicSubscriber(Session sess, Destination topic, String name, String selector, boolean noLocal, boolean durableSubscriber)Constructs a subscriber.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetNoLocal()API method.TopicgetTopic()API method.StringtoString()Returns a string view of this receiver.-
Methods inherited from class org.objectweb.joram.client.jms.MessageConsumer
checkClosed, close, doClose, getDest, getMessageListener, getMessageSelector, getQueueMode, getTargetName, isOpen, isQueueMode, receive, receive, receiveNoWait, setMessageListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.MessageConsumer
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
-
-
-
-
Constructor Detail
-
TopicSubscriber
TopicSubscriber(Session sess, Destination topic, String name, String selector, boolean noLocal, boolean durableSubscriber) throws JMSException
Constructs a subscriber.- Parameters:
sess- The session the subscriber belongs to.topic- The topic the subscriber subscribes to.name- The subscription name, for durable subs only.selector- The selector for filtering messages.noLocal-trueif the subscriber does not wish to consume messages published through the same connection.durableSubscriber- true if durable- Throws:
InvalidDestinationException- if an invalid destination is specified.IllegalStateException- If the connection is broken.JMSException- If the creation fails for any other reason.
-
-
Method Detail
-
toString
public String toString()
Returns a string view of this receiver.- Overrides:
toStringin classMessageConsumer
-
getNoLocal
public boolean getNoLocal() throws JMSExceptionAPI method.- Specified by:
getNoLocalin interfaceTopicSubscriber- Throws:
IllegalStateException- If the subscriber is closed.JMSException
-
getTopic
public Topic getTopic() throws JMSException
API method.- Specified by:
getTopicin interfaceTopicSubscriber- Throws:
IllegalStateException- If the subscriber is closed.JMSException
-
-