public class TopicSubscriber extends MessageConsumer implements javax.jms.TopicSubscriber
javax.jms.TopicSubscriber
interface.MessageConsumer.Closer
dest, 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.
|
javax.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, setMessageListener
TopicSubscriber(Session sess, Destination topic, String name, String selector, boolean noLocal, boolean durableSubscriber) throws javax.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 durablejavax.jms.InvalidDestinationException
- if an invalid destination is specified.javax.jms.IllegalStateException
- If the connection is broken.javax.jms.JMSException
- If the creation fails for any other reason.public String toString()
toString
in class MessageConsumer
public boolean getNoLocal() throws javax.jms.JMSException
getNoLocal
in interface javax.jms.TopicSubscriber
javax.jms.IllegalStateException
- If the subscriber is closed.javax.jms.JMSException
public javax.jms.Topic getTopic() throws javax.jms.JMSException
getTopic
in interface javax.jms.TopicSubscriber
javax.jms.IllegalStateException
- If the subscriber is closed.javax.jms.JMSException
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.