public class TopicSubscriber extends MessageConsumer implements jakarta.jms.TopicSubscriber
jakarta.jms.TopicSubscriber interface.MessageConsumer.Closerdest, noLocal, queueMode, selector, sess, targetName| Constructor and Description |
|---|
TopicSubscriber(Session sess,
Destination topic,
String name,
String selector,
boolean noLocal,
boolean durableSubscriber)
Constructs a subscriber.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getNoLocal()
API method.
|
jakarta.jms.Topic |
getTopic()
API method.
|
String |
toString()
Returns a string view of this receiver.
|
checkClosed, close, doClose, getDest, getMessageListener, getMessageSelector, getQueueMode, getTargetName, isOpen, isQueueMode, receive, receive, receiveNoWait, setMessageListenerTopicSubscriber(Session sess, Destination topic, String name, String selector, boolean noLocal, boolean durableSubscriber) throws jakarta.jms.JMSException
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 - true if the subscriber does not wish to
consume messages published through the same connection.durableSubscriber - true if durablejakarta.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.public String toString()
toString in class MessageConsumerpublic boolean getNoLocal()
throws jakarta.jms.JMSException
getNoLocal in interface jakarta.jms.TopicSubscriberjakarta.jms.IllegalStateException - If the subscriber is closed.jakarta.jms.JMSExceptionpublic jakarta.jms.Topic getTopic()
throws jakarta.jms.JMSException
getTopic in interface jakarta.jms.TopicSubscriberjakarta.jms.IllegalStateException - If the subscriber is closed.jakarta.jms.JMSExceptionCopyright © 2023 ScalAgent D.T.. All rights reserved.