com.ibm.mq.jms
Class MQTopicPublisher
- java.lang.Object
-
- com.ibm.mq.jms.MQRoot
-
- com.ibm.mq.jms.MQMessageProducer
-
- com.ibm.mq.jms.MQTopicPublisher
-
- All Implemented Interfaces:
- JmsMessageProducer, JmsPropertyContext, JmsReadablePropertyContext, JmsTopicPublisher, java.io.Serializable, java.lang.AutoCloseable, java.util.Map<java.lang.String,java.lang.Object>, javax.jms.MessageProducer, javax.jms.TopicPublisher
public class MQTopicPublisher extends MQMessageProducer implements javax.jms.TopicPublisher, JmsTopicPublisher
A client uses an MQTopicPublisher object to publish messages on a topic. An MQTopicPublisher object is the publish subscribe form of a message producer.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description javax.jms.Topic
getTopic()
Gets the topic associated with this publisher.void
publish(javax.jms.Message message)
Publishes a message to the topic.void
publish(javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
Publishes a message to the topic, specifying delivery mode, priority, and time to live.void
publish(javax.jms.Topic topic, javax.jms.Message message)
Publishes a message to a topic for an unidentified message producer.void
publish(javax.jms.Topic topic, javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.-
Methods inherited from class com.ibm.mq.jms.MQMessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
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.MessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
-
-
-
Method Detail
-
getTopic
public javax.jms.Topic getTopic() throws javax.jms.JMSException
Gets the topic associated with this publisher.- Specified by:
getTopic
in interfacejavax.jms.TopicPublisher
- Returns:
- this publisher's topic
- Throws:
javax.jms.JMSException
- if JMS fails to get topic for this topic publisher due to some internal error
-
publish
public void publish(javax.jms.Message message) throws javax.jms.JMSException
Publishes a message to the topic. Uses the topic publisher's default delivery mode, priority, and time to live.- Specified by:
publish
in interfacejavax.jms.TopicPublisher
- Parameters:
message
- the message to publish.- Throws:
javax.jms.JMSException
- if the publisher fails to publish the message due to an internal error.
-
publish
public void publish(javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
Publishes a message to the topic, specifying delivery mode, priority, and time to live.- Specified by:
publish
in interfacejavax.jms.TopicPublisher
- Parameters:
message
- the message to publishdeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds)- Throws:
javax.jms.JMSException
- if the publisher fails to publish the message due to an internal error.
-
publish
public void publish(javax.jms.Topic topic, javax.jms.Message message) throws javax.jms.JMSException
Publishes a message to a topic for an unidentified message producer. Uses the topic publisher's default delivery mode, priority, and time to live.- Specified by:
publish
in interfacejavax.jms.TopicPublisher
- Parameters:
topic
- the topic to publish this message tomessage
- - the message to publish- Throws:
javax.jms.JMSException
- if the publisher fails to publish the message due to an internal error
-
publish
public void publish(javax.jms.Topic topic, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.- Specified by:
publish
in interfacejavax.jms.TopicPublisher
- Parameters:
topic
- the topic to publish this message to.message
- the message to publishdeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the messages lifetime (in milliseconds)- Throws:
javax.jms.JMSException
- if the publisher fails to publish the message due to an internal error.
-
-