WebSphere MQ class: MQQueueSender
java.lang.Object
|
+----com.ibm.mq.jms.MQMessageProducer
|
+----com.ibm.mq.jms.MQQueueSender
|
A client uses a QueueSender 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
public void close() throws JMSException
Because a provider may allocate some resources outside of the JVM on behalf of a QueueSender, clients should close them when they are not needed. You cannot rely on garbage collection to reclaim these resources eventually, because this may not occur soon enough.
public Queue getQueue() throws JMSException
Get the queue associated with this queue sender.
public void send(Message message) throws JMSException
Send a message to the queue. Use the QueueSender's default delivery mode, time to live, and priority.
public void send(Message message,
int deliveryMode,
int priority,
long timeToLive) throws JMSException
Send a message specifying delivery mode, priority, and time to live to the queue.
public void send(Queue queue,
Message message) throws JMSException
Send a message to the specified queue with the QueueSender's default delivery mode, time to live, and priority.
public void send(Queue queue,
Message message,
int deliveryMode,
int priority,
long timeToLive) throws JMSException
Send a message to the specified queue with delivery mode, priority, and time to live.