com.ibm.mq.jms
Class MQTopicSession
- java.lang.Object
-
- com.ibm.mq.jms.MQRoot
-
- com.ibm.mq.jms.MQSession
-
- com.ibm.mq.jms.MQTopicSession
-
- All Implemented Interfaces:
- JmsPropertyContext, JmsReadablePropertyContext, JmsSession, JmsTopicSession, java.io.Serializable, java.lang.AutoCloseable, java.lang.Runnable, java.util.Map<java.lang.String,java.lang.Object>, javax.jms.Session, javax.jms.TopicSession
public class MQTopicSession extends MQSession implements javax.jms.TopicSession, JmsTopicSession
An MQTopicSession object provides methods for creating MQTopicPublisher, MQTopicSubscriber, and MQTemporaryTopic objects.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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.-
Methods inherited from class com.ibm.mq.jms.MQSession
close, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableConsumer, createDurableConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createSharedConsumer, createSharedConsumer, createSharedDurableConsumer, createSharedDurableConsumer, createStreamMessage, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, deliver, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, setMessageListener, unsubscribe
-
Methods inherited from class com.ibm.mq.jms.MQRoot
clear, containsKey, containsValue, entrySet, equals, get, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, size, values
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.msg.client.jms.JmsPropertyContext
setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
Methods inherited from interface com.ibm.msg.client.jms.JmsReadablePropertyContext
getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface javax.jms.TopicSession
createDurableSubscriber, createDurableSubscriber, createTemporaryTopic, createTopic, unsubscribe
-
Methods inherited from interface javax.jms.Session
close, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableConsumer, createDurableConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createSharedConsumer, createSharedConsumer, createSharedDurableConsumer, createSharedDurableConsumer, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, 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 interfacejavax.jms.TopicSession
- Parameters:
topic
- the topic on which messages are to be published- Returns:
- the publisher
- 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 interfacejavax.jms.TopicSession
- Parameters:
topic
- the topic to subscribe to- Returns:
- the topic subscriber
- Throws:
javax.jms.JMSException
- if the session fails to create a subscriber due to some JMS error.javax.jms.InvalidDestinationException
- if an invalid topic is 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 interfacejavax.jms.TopicSession
- Parameters:
topic
- the topic to subscribe toselector
- only messages with properties matching the message selector expression are delivered. This value may be nullnoLocal
- if set, inhibits the delivery of messages published by its own connection- Returns:
- the topic subscriber
- Throws:
javax.jms.JMSException
- if the session fails to create a subscriber due to some JMS error or invalid selectorjavax.jms.InvalidDestinationException
- if an invalid topic is specified.javax.jms.InvalidSelectorException
- if the message selector is invalid.
-
-