WebSphere MQ class: MQTopicSession
java.lang.Object
|
+----com.ibm.mq.jms.MQSession
|
+----com.ibm.mq.jms.MQTopicSession
|
A TopicSession provides methods for creating TopicPublishers, TopicSubscribers and TemporaryTopics.
See also: Session
public MQTopicSession(boolean transacted,
int acknowledgeMode) throws JMSException
See TopicConnection.createTopicSession.
public TopicSubscriber createDurableSubscriber
(Topic topic,
java.lang.String name) throws JMSException
Create a durable subscriber to the specified topic.
| WebSphere MQ Event Broker note |
|---|
|
This method throws a JMSException when you have a direct connection to WebSphere MQ Event Broker. |
See TopicSession.unsubscribe
public TopicSubscriber createDurableSubscriber
(Topic topic,
java.lang.String name,
java.lang.String messageSelector,
boolean noLocal) throws JMSException
Create a durable subscriber to the specified topic. A client can change an existing durable subscription by creating a durable subscriber with the same name and a new topic or message selector or both.
| WebSphere MQ Event Broker note |
|---|
|
This method throws a JMSException when you have a direct connection to WebSphere MQ Event Broker. |
public TopicPublisher createPublisher(Topic topic)
throws JMSException
Create a Publisher for the specified Topic.
public TopicSubscriber createSubscriber(Topic topic)
throws JMSException
Create a non-durable subscriber to the specified topic.
public TopicSubscriber createSubscriber
(Topic topic,
java.lang.String messageSelector,
boolean noLocal) throws JMSException
Create a non-durable subscriber to the specified topic.
public TemporaryTopic createTemporaryTopic()
throws JMSException
Create a temporary topic. Its lifetime will be that of the TopicConnection unless deleted earlier.
public Topic createTopic(java.lang.String topicName)
throws JMSException
Create a Topic given a URI format Topic name. (URI format is described in Creating topics at runtime.) This allows the creation of a topic with a provider specific name.
public void unsubscribe(java.lang.String name)
throws JMSException
Unsubscribe a durable subscription that has been created by a client.
| WebSphere MQ Event Broker note |
|---|
|
This method throws a JMSException when you have a direct connection to WebSphere MQ Event Broker. |