MQTopicSession
public class MQTopicSession
extends MQSession
implements TopicSession
java.lang.Object
|
+----com.ibm.mq.jms.MQSession
|
+----com.ibm.mq.jms.MQTopicSession
An MQTopicSession object provides methods for creating
MQTopicPublisher, MQTopicSubscriber, and
MQTemporaryTopic objects.
Methods
createPublisher
public TopicPublisher createPublisher(Topic topic) throws JMSException;
Creates a publisher for the specified topic.
- Parameters
-
- topic - the Topic on which messages are to be published.
- Exceptions
-
- JMSException - if a Session fails to create a publisher due to an internal
error.
createSubscriber
public TopicSubscriber createSubscriber(Topic topic) throws JMSException;
Creates a nondurable Subscriber to the specified topic.
- Parameters
-
- topic - the topic to subscribe to
- Exceptions
-
- JMSException - if a session fails to create a subscriber due to some JMS
error.
- InvalidDestinationException - if invalid Topic specified.
createSubscriber
public TopicSubscriber createSubscriber(Topic topic, String selector,
boolean noLocal)
throws JMSException;
Creates a nondurable Subscriber to the specified topic.
- 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.
- Exceptions
-
- JMSException - if a session fails to create a subscriber due to some JMS
error or invalid selector.
- InvalidDestinationException - if invalid Topic specified.
- InvalidSelectorException - if the message selector is invalid.
createTemporaryTopic
public TemporaryTopic createTemporaryTopic() throws JMSException;
Creates a TemporaryTopic object. Its lifetime will be that of the MQTopicConnection
unless it is deleted earlier.
- Returns
-
- Exceptions
-
- JMSException - if the session fails to create a temporary topic due to
some internal error.
createTopic
public Topic createTopic(String topicName) throws JMSException;
Creates a topic identity given a Topic name.
- Parameters
-
- topicName - the name of this Topic
- Returns
-
- a Topic with the given name
- Exceptions
-
- JMSException - if the session fails to create a topic due to some internal
error.