|
Préférences
Moteurs de recherche
|
||||||||||||||||||||
JavaTM Platform, Enterprise Edition, v 5.0
javax.jms
|
Field Summary |
---|
Fields inherited from interface javax.jms.Session |
---|
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Method Summary | |
---|---|
QueueBrowser |
createBrowser(Queue queue)
Creates a QueueBrowser object to peek at the messages on
the specified queue. |
QueueBrowser |
createBrowser(Queue queue,
String messageSelector)
Creates a QueueBrowser object to peek at the messages on
the specified queue using a message selector. |
Queue |
createQueue(String queueName)
Creates a queue identity given a Queue name. |
QueueReceiver |
createReceiver(Queue queue)
Creates a QueueReceiver object to receive messages from the
specified queue. |
QueueReceiver |
createReceiver(Queue queue,
String messageSelector)
Creates a QueueReceiver object to receive messages from the
specified queue using a message selector. |
QueueSender |
createSender(Queue queue)
Creates a QueueSender object to send messages to the
specified queue. |
TemporaryQueue |
createTemporaryQueue()
Creates a TemporaryQueue object. |
Method Detail |
---|
Queue createQueue(String queueName) throws JMSException
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
queueName
- the name of this Queue
Queue
with the given name
JMSException
- if the session fails to create a queue
due to some internal error.QueueReceiver createReceiver(Queue queue) throws JMSException
QueueReceiver
object to receive messages from the
specified queue.
queue
- the Queue
to access
JMSException
- if the session fails to create a receiver
due to some internal error.
InvalidDestinationException
- if an invalid queue is specified.QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException
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
- if the session fails to create a receiver
due to some internal error.
InvalidDestinationException
- if an invalid queue is specified.
InvalidSelectorException
- if the message selector is invalid.QueueSender createSender(Queue queue) throws JMSException
QueueSender
object to send messages to the
specified queue.
queue
- the Queue
to access, or null if this is an
unidentified producer
JMSException
- if the session fails to create a sender
due to some internal error.
InvalidDestinationException
- if an invalid queue is specified.QueueBrowser createBrowser(Queue queue) throws JMSException
QueueBrowser
object to peek at the messages on
the specified queue.
createBrowser
in interface Session
queue
- the Queue
to access
JMSException
- if the session fails to create a browser
due to some internal error.
InvalidDestinationException
- if an invalid queue is specified.QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException
QueueBrowser
object to peek at the messages on
the specified queue using a message selector.
createBrowser
in interface Session
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
- if the session fails to create a browser
due to some internal error.
InvalidDestinationException
- if an invalid queue is specified.
InvalidSelectorException
- if the message selector is invalid.TemporaryQueue createTemporaryQueue() throws JMSException
TemporaryQueue
object. Its lifetime will be that
of the QueueConnection
unless it is deleted earlier.
createTemporaryQueue
in interface Session
JMSException
- if the session fails to create a temporary queue
due to some internal error.