Movatterモバイル変換


[0]ホーム

URL:


         


Interface QueueSession

All Superinterfaces:
java.lang.Runnable,Session

public interfaceQueueSession
extendsSession

AQueueSession object provides methods for creatingQueueReceiver,QueueSender,QueueBrowser, andTemporaryQueue objects.

If there are messages that have been received but not acknowledged when aQueueSession terminates, these messages will be retained and redelivered when a consumer next accesses the queue.

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

Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE,CLIENT_ACKNOWLEDGE,DUPS_OK_ACKNOWLEDGE
 
createBrowser(Queue queue)
          Creates aQueueBrowser object to peek at the messages on the specified queue.
createBrowser(Queue queue, java.lang.String messageSelector)
          Creates aQueueBrowser object to peek at the messages on the specified queue using a message selector.
createQueue(java.lang.String queueName)
          Creates a queue identity given aQueue name.
createReceiver(Queue queue)
          Creates aQueueReceiver object to receive messages from the specified queue.
createReceiver(Queue queue, java.lang.String messageSelector)
          Creates aQueueReceiver object to receive messages from the specified queue using a message selector.
createSender(Queue queue)
          Creates aQueueSender object to send messages to the specified queue.
createTemporaryQueue()
          Creates aTemporaryQueue object.
 
Methods inherited from interface javax.jms.Session
close,commit,createBytesMessage,createMapMessage,createMessage,createObjectMessage,createObjectMessage,createStreamMessage,createTextMessage,createTextMessage,getMessageListener,getTransacted,recover,rollback,run,setMessageListener
 

createQueue

publicQueuecreateQueue(java.lang.String queueName)                  throwsJMSException
Creates a queue identity given aQueue 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 thecreateTemporaryQueue method.

Parameters:
queueName - the name of thisQueue
Returns:
aQueue with the given name
Throws:
JMSException - if the session fails to create a queue due to some internal error.

createReceiver

publicQueueReceivercreateReceiver(Queue queue)                             throwsJMSException
Creates aQueueReceiver object to receive messages from the specified queue.
Parameters:
queue - theQueue to access
Throws:
JMSException - if the session fails to create a receiver due to some internal error.
InvalidDestinationException - if an invalid queue is specified.

createReceiver

publicQueueReceivercreateReceiver(Queue queue,                                    java.lang.String messageSelector)                             throwsJMSException
Creates aQueueReceiver object to receive messages from the specified queue using a message selector.
Parameters:
queue - theQueue 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:
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.

createSender

publicQueueSendercreateSender(Queue queue)                         throwsJMSException
Creates aQueueSender object to send messages to the specified queue.
Parameters:
queue - theQueue to access, or null if this is an unidentified producer
Throws:
JMSException - if the session fails to create a sender due to some internal error.
InvalidDestinationException - if an invalid queue is specified.

createBrowser

publicQueueBrowsercreateBrowser(Queue queue)                           throwsJMSException
Creates aQueueBrowser object to peek at the messages on the specified queue.
Parameters:
queue - theQueue to access
Throws:
JMSException - if the session fails to create a browser due to some internal error.
InvalidDestinationException - if an invalid queue is specified.

createBrowser

publicQueueBrowsercreateBrowser(Queue queue,                                  java.lang.String messageSelector)                           throwsJMSException
Creates aQueueBrowser object to peek at the messages on the specified queue using a message selector.
Parameters:
queue - theQueue 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:
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.

createTemporaryQueue

publicTemporaryQueuecreateTemporaryQueue()                                    throwsJMSException
Creates aTemporaryQueue object. Its lifetime will be that of theQueueConnection unless it is deleted earlier.
Returns:
a temporary queue identity
Throws:
JMSException - if the session fails to create a temporary queue due to some internal error.

         


[8]ページ先頭

©2009-2025 Movatter.jp