com.ibm.mq.jms
Class MQQueueSender
- java.lang.Object
-
- com.ibm.mq.jms.MQRoot
-
- com.ibm.mq.jms.MQMessageProducer
-
- com.ibm.mq.jms.MQQueueSender
-
- All Implemented Interfaces:
- JmsMessageProducer, JmsPropertyContext, JmsQueueSender, JmsReadablePropertyContext, java.io.Serializable, java.lang.AutoCloseable, java.util.Map<java.lang.String,java.lang.Object>, javax.jms.MessageProducer, javax.jms.QueueSender
public class MQQueueSender extends MQMessageProducer implements javax.jms.QueueSender, JmsQueueSender
A client uses an MQQueueSender to send messages to a queue. A QueueSender is normally associated with a particular queue. However, it is possible to create an unidentified QueueSender that is not associated with any given queue.- See Also:
MessageProducer, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close the sender.javax.jms.QueuegetQueue()Gets the Queue associated with this sender.voidsend(javax.jms.Queue queue, javax.jms.Message message)Sends a message to a queue for an unidentified message producer.voidsend(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive)Sends a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live.-
Methods inherited from class com.ibm.mq.jms.MQMessageProducer
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, toJson
-
Methods inherited from interface com.ibm.msg.client.jms.JmsReadablePropertyContext
getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, stringifyMe
-
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
getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
-
-
-
Method Detail
-
close
public void close() throws javax.jms.JMSExceptionClose the sender. Releases underlying resources associated with this sender.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejavax.jms.MessageProducer- Overrides:
closein classMQMessageProducer- Throws:
javax.jms.JMSException- if underlying MQ calls fail.
-
getQueue
public javax.jms.Queue getQueue() throws javax.jms.JMSExceptionGets the Queue associated with this sender.- Specified by:
getQueuein interfacejavax.jms.QueueSender- Returns:
- the queue
- Throws:
javax.jms.JMSException- if the operation fails
-
send
public void send(javax.jms.Queue queue, javax.jms.Message message) throws javax.jms.JMSExceptionSends a message to a queue for an unidentified message producer. Use the QueueSender's default delivery mode, timeToLive and priority.Typically a JMS message producer is assigned a queue at creation time; however, JMS also supports unidentified message producers which require that the queue be supplied on every message send.
- Specified by:
sendin interfacejavax.jms.QueueSender- Parameters:
queue- the queue that this message should be sent tomessage- the message to be sent- Throws:
javax.jms.JMSException- if the operation fails
-
send
public void send(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSExceptionSends a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live.Typically a JMS message producer is assigned a queue at creation time; however, JMS also supports unidentified message producers which require that the queue be supplied on every message send.
- Specified by:
sendin interfacejavax.jms.QueueSender- Parameters:
queue- the queue that this message should be sent tomessage- the message to be sentdeliveryMode- the delivery mode to usepriority- the priority for this messagetimeToLive- the message's lifetime (in milliseconds).- Throws:
javax.jms.JMSException- if the operation fails
-
-