com.ibm.mq.jms
Class MQTopicSubscriber

java.lang.Object
  |
  +--com.ibm.mq.jms.MQMessageConsumer
        |
        +--com.ibm.mq.jms.MQTopicSubscriber
All Implemented Interfaces:
javax.jms.MessageConsumer, javax.jms.TopicSubscriber

public class MQTopicSubscriber
extends MQMessageConsumer
implements javax.jms.TopicSubscriber

A client uses an MQTopicSubscriber object to receive messages that have been published to a topic.

See Also:
MQMessageConsumer, MQTopicSession.createSubscriber(javax.jms.Topic)

Method Summary
 void close()
          Closes the subscriber and releases underlying resources associated with this subscriber.
 javax.jms.Topic getTopic()
          Gets the topic associated with this subscriber.
 
Methods inherited from class com.ibm.mq.jms.MQMessageConsumer
getDestination, getMessageListener, getMessageSelector, getNoLocal, receive, receive, receiveNoWait, setMessageListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.TopicSubscriber
getNoLocal
 
Methods inherited from interface javax.jms.MessageConsumer
getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
 

Method Detail

close

public void close()
           throws javax.jms.JMSException
Closes the subscriber and releases underlying resources associated with this subscriber.

Specified by:
close in interface javax.jms.MessageConsumer
Overrides:
close in class MQMessageConsumer
Throws:
javax.jms.JMSException - if the underlying MQ calls fail.

getTopic

public javax.jms.Topic getTopic()
                         throws javax.jms.JMSException
Gets the topic associated with this subscriber.

Specified by:
getTopic in interface javax.jms.TopicSubscriber
Overrides:
getTopic in class MQMessageConsumer
Returns:
this subscriber's topic
Throws:
javax.jms.JMSException - if JMS fails to get topic for this topic subscriber due to some internal error.

(c) Copyright IBM Corp. 2005. All Rights Reserved.