TopicSubscriber


public interface TopicSubscriber
extends MessageConsumer

WebSphere MQ class: MQTopicSubscriber



java.lang.Object
   |
   +----com.ibm.mq.jms.MQMessageConsumer
           |
           +----com.ibm.mq.jms.MQTopicSubscriber

A client uses a TopicSubscriber for receiving messages that have been published to a topic. TopicSubscriber is the Pub/Sub variant of a JMS message consumer.

See also: MessageConsumer and TopicSession.createSubscriber

MQTopicSubscriber inherits the following methods from MQMessageConsumer:

close
getMessageListener
receive
receiveNoWait
setMessageListener

Methods

getNoLocal
public boolean getNoLocal() throws JMSException

Get the NoLocal attribute for this TopicSubscriber. The default value for this attribute is false.

Returns:
set to true if locally published messages are being inhibited.

Throws:
JMSException - if JMS fails to get NoLocal attribute for this topic subscriber because of an internal error.

getTopic
public Topic getTopic() throws JMSException

Get the topic associated with this subscriber.

Returns:
this subscriber's topic.

Throws:
JMSException - if JMS fails to get topic for this topic subscriber because of an internal error.



© IBM Corporation 1997, 2002. All Rights Reserved