|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A QueueSession
object provides methods for creating
QueueReceiver
, QueueSender
,
QueueBrowser
, and TemporaryQueue
objects.
If there are messages that have been received but not acknowledged
when a QueueSession
terminates, these messages will be retained
and redelivered when a consumer next accesses the queue.
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, and allows transactions to be used across the two
messaging domains.
A QueueSession
cannot be used to create objects specific to the
publish/subscribe domain. The following methods inherit from
Session
, but must throw an
IllegalStateException
if they are used from QueueSession
:
createDurableSubscriber
createTemporaryTopic
createTopic
unsubscribe
Session
(src) ,
QueueConnection.createQueueSession(boolean, int)
,
XAQueueSession.getQueueSession()
Field Summary |
Fields inherited from interface javax.jms.Session (src) |
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Method Summary | |
QueueBrowser (src) |
createBrowser(Queue (src) queue)
Creates a QueueBrowser object to peek at the messages on
the specified queue. |
QueueBrowser (src) |
createBrowser(Queue (src) queue,
java.lang.String messageSelector)
Creates a QueueBrowser object to peek at the messages on
the specified queue using a message selector. |
Queue (src) |
createQueue(java.lang.String queueName)
Creates a queue identity given a Queue name. |
QueueReceiver (src) |
createReceiver(Queue (src) queue)
Creates a QueueReceiver object to receive messages from the
specified queue. |
QueueReceiver (src) |
createReceiver(Queue (src) queue,
java.lang.String messageSelector)
Creates a QueueReceiver object to receive messages from the
specified queue using a message selector. |
QueueSender (src) |
createSender(Queue (src) queue)
Creates a QueueSender object to send messages to the
specified queue. |
TemporaryQueue (src) |
createTemporaryQueue()
Creates a TemporaryQueue object. |
Method Detail |
public Queue (src) createQueue(java.lang.String queueName) throws JMSException (src)
Queue
name.
This facility is provided for the rare cases where clients need to dynamically manipulate queue identity. It allows the creation of a queue identity with a provider-specific name. Clients that depend on this ability are not portable.
Note that this method is not for creating the physical queue.
The physical creation of queues is an administrative task and is not
to be initiated by the JMS API. The one exception is the
creation of temporary queues, which is accomplished with the
createTemporaryQueue
method.
createQueue
in interface Session (src)
queueName
- the name of this Queue
Queue
with the given name
JMSException (src)
- if the session fails to create a queue
due to some internal error.public QueueReceiver (src) createReceiver(Queue (src) queue) throws JMSException (src)
QueueReceiver
object to receive messages from the
specified queue.
queue
- the Queue
to access
JMSException (src)
- if the session fails to create a receiver
due to some internal error.
InvalidDestinationException (src)
- if an invalid queue is specified.public QueueReceiver (src) createReceiver(Queue (src) queue, java.lang.String messageSelector) throws JMSException (src)
QueueReceiver
object to receive messages from the
specified queue using a message selector.
queue
- the Queue
to accessmessageSelector
- 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.
JMSException (src)
- if the session fails to create a receiver
due to some internal error.
InvalidDestinationException (src)
- if an invalid queue is specified.
InvalidSelectorException (src)
- if the message selector is invalid.public QueueSender (src) createSender(Queue (src) queue) throws JMSException (src)
QueueSender
object to send messages to the
specified queue.
queue
- the Queue
to access, or null if this is an
unidentified producer
JMSException (src)
- if the session fails to create a sender
due to some internal error.
InvalidDestinationException (src)
- if an invalid queue is specified.public QueueBrowser (src) createBrowser(Queue (src) queue) throws JMSException (src)
QueueBrowser
object to peek at the messages on
the specified queue.
createBrowser
in interface Session (src)
queue
- the Queue
to access
JMSException (src)
- if the session fails to create a browser
due to some internal error.
InvalidDestinationException (src)
- if an invalid queue is specified.public QueueBrowser (src) createBrowser(Queue (src) queue, java.lang.String messageSelector) throws JMSException (src)
QueueBrowser
object to peek at the messages on
the specified queue using a message selector.
createBrowser
in interface Session (src)
queue
- the Queue
to accessmessageSelector
- 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.
JMSException (src)
- if the session fails to create a browser
due to some internal error.
InvalidDestinationException (src)
- if an invalid queue is specified.
InvalidSelectorException (src)
- if the message selector is invalid.public TemporaryQueue (src) createTemporaryQueue() throws JMSException (src)
TemporaryQueue
object. Its lifetime will be that
of the QueueConnection
unless it is deleted earlier.
createTemporaryQueue
in interface Session (src)
JMSException (src)
- if the session fails to create a temporary queue
due to some internal error.
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |