Websphere MQ Everyplace

com.ibm.mqe.jms
Class MQeQueueSession

java.lang.Object
  |
  +--com.ibm.mqe.jms.MQeSession
        |
        +--com.ibm.mqe.jms.MQeQueueSession
All Implemented Interfaces:
javax.jms.QueueSession, java.lang.Runnable, javax.jms.Session

public class MQeQueueSession
extends MQeSession
implements javax.jms.QueueSession

A QueueSession object provides methods for creating QueueReceiver, QueueSender, QueueBrowser, and TemporaryQueue objects.

A QueueSession is used for creating Point-to-Point specific objects. In general, use the Session object. The QueueSession is used to support existing code. Using the Session object simplifies the programming model.

A QueueSession cannot be used to create objects specific to the publish/subscribe domain. The following methods inherit from Session, but throw an IllegalStateException if they are used from QueueSession:

See Also:
Session, QueueConnection.createQueueSession(boolean, int)

Field Summary
 
Fields inherited from class com.ibm.mqe.jms.MQeSession
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Method Summary
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
          Creates a QueueReceiver object to receive messages from the specified queue.
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String messageSelector)
          Creates a QueueReceiver object to receive messages from the specified queue using a message selector.
 javax.jms.QueueSender createSender(javax.jms.Queue queue)
          Create a QueueSender to send messages to the specified queue.
 
Methods inherited from class com.ibm.mqe.jms.MQeSession
close, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, getAcknowledgementMode, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, setMessageListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.QueueSession
createBrowser, createBrowser, createQueue, createTemporaryQueue
 
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
 

Method Detail

createSender

public javax.jms.QueueSender createSender(javax.jms.Queue queue)
                                   throws javax.jms.JMSException
Create a QueueSender to send messages to the specified queue.

Specified by:
createSender in interface javax.jms.QueueSession
Parameters:
queue - the queue to access, or null if this is an unidentifed producer.
Returns:
a QueueSender
Throws:
javax.jms.JMSException - if a session fails to create a sender due to some JMS error.
javax.jms.InvalidDestinationException - if an invalid Queue is specified.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
                                       throws javax.jms.JMSException
Creates a QueueReceiver object to receive messages from the specified queue.

Specified by:
createReceiver in interface javax.jms.QueueSession
Parameters:
queue - the Queue to access
Throws:
javax.jms.JMSException - if the session fails to create a receiver due to some internal error.
javax.jms.InvalidDestinationException - if an invalid queue is specified.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String messageSelector)
                                       throws javax.jms.JMSException
Creates a QueueReceiver object to receive messages from the specified queue using a message selector.

Specified by:
createReceiver in interface javax.jms.QueueSession
Parameters:
queue - the Queue to access
messageSelector - only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
Throws:
javax.jms.JMSException - if the session fails to create a receiver due to some internal error.
javax.jms.InvalidDestinationException - if an invalid queue is specified.
javax.jms.InvalidSelectorException - if the message selector is invalid.

Websphere MQ Everyplace