Websphere MQ Everyplace

com.ibm.mqe.jms
Class MQeQueueSender

java.lang.Object
  |
  +--com.ibm.mqe.jms.MQeMessageProducer
        |
        +--com.ibm.mqe.jms.MQeQueueSender
All Implemented Interfaces:
javax.jms.MessageProducer, javax.jms.QueueSender

public class MQeQueueSender
extends MQeMessageProducer
implements javax.jms.QueueSender

A client uses a QueueSender to send messages to a queue.

In the case that the QueueSender with an unidentified Queue is created, the methods that assume the Queue has been identified throw an Invalid Destination Exception.

See Also:
MessageProducer

Method Summary
 javax.jms.Queue getQueue()
          Get the queue associated with this queue sender.
 void send(javax.jms.Message message)
          Send a message to the queue.
 void send(javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
          Send a message specifying delivery mode, priority and time to live to the queue.
 void send(javax.jms.Queue queue, javax.jms.Message message)
          Send a message to a queue for an unidentified message producer.
 void send(javax.jms.Queue queue, javax.jms.Message message, int deliveryMode, int priority, long timeToLive)
          Send a message to a queue for an unidentified message producer, specifying delivery mode, priority and time to live.
 
Methods inherited from class com.ibm.mqe.jms.MQeMessageProducer
close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.MessageProducer
close, getDeliveryMode, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
 

Method Detail

getQueue

public javax.jms.Queue getQueue()
                         throws javax.jms.JMSException
Get the queue associated with this queue sender.

Specified by:
getQueue in interface javax.jms.QueueSender
Returns:
the queue
Throws:
javax.jms.JMSException - if JMS fails to get queue for this queue sender due to some internal error.

send

public void send(javax.jms.Message message)
          throws javax.jms.JMSException
Send a message to the queue. Use the QueueSender's default delivery mode, timeToLive and priority.

Specified by:
send in interface javax.jms.QueueSender
Parameters:
message - the message to be sent
Throws:
javax.jms.JMSException - if JMS fails to send the message due to some internal error.
javax.jms.MessageFormatException - if invalid message specified
javax.jms.InvalidDestinationException - if a client uses this method with a Queue sender with an invalid queue.

send

public void send(javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Send a message specifying delivery mode, priority and time to live to the queue.

Specified by:
send in interface javax.jms.QueueSender
Parameters:
message - the message to be sent
deliveryMode - the delivery mode to use
priority - the priority for this message
timeToLive - the message's lifetime (in milliseconds).
Throws:
javax.jms.JMSException - if JMS fails to send the message due to some internal error.
javax.jms.MessageFormatException - if invalid message specified
javax.jms.InvalidDestinationException - if a client uses this method with a Queue sender with an invalid queue.

send

public void send(javax.jms.Queue queue,
                 javax.jms.Message message)
          throws javax.jms.JMSException
Send 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:
send in interface javax.jms.QueueSender
Parameters:
queue - the queue that this message should be sent to
message - the message to be sent
Throws:
javax.jms.JMSException - if JMS fails to send the message due to some internal error.
javax.jms.MessageFormatException - if invalid message specified
javax.jms.InvalidDestinationException - if a client uses this method with an invalid queue.

send

public void send(javax.jms.Queue queue,
                 javax.jms.Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
          throws javax.jms.JMSException
Send 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:
send in interface javax.jms.QueueSender
Parameters:
queue - the queue that this message should be sent to
message - the message to be sent
deliveryMode - the delivery mode to use
priority - the priority for this message
timeToLive - the message's lifetime (in milliseconds).
Throws:
javax.jms.JMSException - if JMS fails to send the message due to some internal error.
javax.jms.MessageFormatException - if invalid message specified
javax.jms.InvalidDestinationException - if a client uses this method with an invalid queue.

Websphere MQ Everyplace