com.ibm.mq.jms
Class MQTopicSession

java.lang.Object
  |
  +--com.ibm.mq.jms.MQSession
        |
        +--com.ibm.mq.jms.MQTopicSession
All Implemented Interfaces:
JMSAcknowledgePoint, JMSDestinationFactory, java.lang.Runnable, javax.jms.Session, javax.jms.TopicSession

public class MQTopicSession
extends MQSession
implements javax.jms.TopicSession

An MQTopicSession object provides methods for creating MQTopicPublisher, MQTopicSubscriber, and MQTemporaryTopic objects.


Field Summary
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
     
Method Summary
 javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
          Creates a publisher for the specified topic.
 javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
          Creates a nondurable Subscriber to the specified topic.
 javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic, java.lang.String selector, boolean noLocal)
          Creates a nondurable Subscriber to the specified topic.
 javax.jms.TemporaryTopic createTemporaryTopic()
          Creates a TemporaryTopic object.
 javax.jms.Topic createTopic(java.lang.String topicName)
          Creates a topic identity given a Topic name.
 
Methods inherited from class com.ibm.mq.jms.MQSession
createBytesMessage, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, setMessageListener, unsubscribe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.TopicSession
createDurableSubscriber, createDurableSubscriber, unsubscribe
 
Methods inherited from interface javax.jms.Session
createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, run, setMessageListener
 

Method Detail

createPublisher

public javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
                                         throws javax.jms.JMSException
Creates a publisher for the specified topic.

Specified by:
createPublisher in interface javax.jms.TopicSession
Parameters:
topic - the Topic on which messages are to be published.
Throws:
javax.jms.JMSException - if a Session fails to create a publisher due to an internal error.

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
                                           throws javax.jms.JMSException
Creates a nondurable Subscriber to the specified topic.

Specified by:
createSubscriber in interface javax.jms.TopicSession
Parameters:
topic - the topic to subscribe to
Throws:
javax.jms.JMSException - if a session fails to create a subscriber due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Topic specified.

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic,
                                                  java.lang.String selector,
                                                  boolean noLocal)
                                           throws javax.jms.JMSException
Creates a nondurable Subscriber to the specified topic.

Specified by:
createSubscriber in interface javax.jms.TopicSession
Parameters:
topic - the topic to subscribe to
selector - only messages with properties matching the message selector expression are delivered. This value may be null.
noLocal - if set, inhibits the delivery of messages published by its own connection.
Throws:
javax.jms.JMSException - if a session fails to create a subscriber due to some JMS error or invalid selector.
javax.jms.InvalidDestinationException - if invalid Topic specified.
javax.jms.InvalidSelectorException - if the message selector is invalid.

createTemporaryTopic

public javax.jms.TemporaryTopic createTemporaryTopic()
                                              throws javax.jms.JMSException
Creates a TemporaryTopic object. Its lifetime will be that of the MQTopicConnection unless it is deleted earlier.

Specified by:
createTemporaryTopic in interface javax.jms.TopicSession
Overrides:
createTemporaryTopic in class MQSession
Returns:
a temporary topic
Throws:
javax.jms.JMSException - if the session fails to create a temporary topic due to some internal error.

createTopic

public javax.jms.Topic createTopic(java.lang.String topicName)
                            throws javax.jms.JMSException
Creates a topic identity given a Topic name.

Specified by:
createTopic in interface javax.jms.TopicSession
Overrides:
createTopic in class MQSession
Parameters:
topicName - the name of this Topic
Returns:
a Topic with the given name
Throws:
javax.jms.JMSException - if the session fails to create a topic due to some internal error.

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