Package org.ow2.joram.jakarta.jms
Class TopicSubscriber
- java.lang.Object
-
- org.ow2.joram.jakarta.jms.MessageConsumer
-
- org.ow2.joram.jakarta.jms.TopicSubscriber
-
- All Implemented Interfaces:
jakarta.jms.MessageConsumer,jakarta.jms.TopicSubscriber,AutoCloseable
public class TopicSubscriber extends MessageConsumer implements jakarta.jms.TopicSubscriber
Implements thejakarta.jms.TopicSubscriberinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ow2.joram.jakarta.jms.MessageConsumer
MessageConsumer.Closer
-
-
Field Summary
-
Fields inherited from class org.ow2.joram.jakarta.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.jakarta.jms.TopicgetTopic()API method.StringtoString()Returns a string view of this receiver.-
Methods inherited from class org.ow2.joram.jakarta.jms.MessageConsumer
checkClosed, close, doClose, getDest, getMessageListener, getMessageSelector, getQueueMode, getTargetName, isOpen, isQueueMode, receive, receive, receiveNoWait, setMessageListener
-
-
-
-
Constructor Detail
-
TopicSubscriber
TopicSubscriber(Session sess, Destination topic, String name, String selector, boolean noLocal, boolean durableSubscriber) throws jakarta.jms.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:
jakarta.jms.InvalidDestinationException- if an invalid destination is specified.jakarta.jms.IllegalStateException- If the connection is broken.jakarta.jms.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 jakarta.jms.JMSExceptionAPI method.- Specified by:
getNoLocalin interfacejakarta.jms.TopicSubscriber- Throws:
jakarta.jms.IllegalStateException- If the subscriber is closed.jakarta.jms.JMSException
-
getTopic
public jakarta.jms.Topic getTopic() throws jakarta.jms.JMSExceptionAPI method.- Specified by:
getTopicin interfacejakarta.jms.TopicSubscriber- Throws:
jakarta.jms.IllegalStateException- If the subscriber is closed.jakarta.jms.JMSException
-
-