org.objectweb.joram.client.jms
Class QueueSession

java.lang.Object
  extended by org.objectweb.joram.client.jms.Session
      extended by org.objectweb.joram.client.jms.QueueSession
All Implemented Interfaces:
java.lang.Runnable, javax.jms.QueueSession, javax.jms.Session

public class QueueSession
extends Session
implements javax.jms.QueueSession

Implements the javax.jms.QueueSession interface.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.objectweb.joram.client.jms.Session
Session.Closer
 
Field Summary
 
Fields inherited from class org.objectweb.joram.client.jms.Session
deliveries, logger, messageListener, sendings, transacted
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
 
Constructor Summary
QueueSession(Connection cnx, boolean transacted, int acknowledgeMode, RequestMultiplexer mtpx)
          Constructs a queue session.
 
Method Summary
 javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name)
          API method.
 javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name, java.lang.String selector, boolean noLocal)
          API method.
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
          API method.
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String selector)
          API method.
 javax.jms.QueueSender createSender(javax.jms.Queue queue)
          API method.
 javax.jms.TemporaryTopic createTemporaryTopic()
          API method.
 javax.jms.Topic createTopic(java.lang.String topicName)
          API method.
 java.lang.String toString()
          Returns a String image of this session.
 void unsubscribe(java.lang.String name)
          API method.
 
Methods inherited from class org.objectweb.joram.client.jms.Session
acknowledge, addConsumer, addMessageListener, addProducer, checkClosed, checkConsumers, close, closeBrowser, closeConsumer, closeProducer, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, doClose, getAckMode, getAcknowledgeMode, getConnection, getId, getMessageListener, getQueueMessageReadMax, getRequestMultiplexer, getTopicAckBufferMax, getTopicActivationThreshold, getTopicPassivationThreshold, getTransacted, isAsyncSend, isAsyncSub, isAutoAck, isImplicitAck, isStarted, onMessage, onMessage, pushMessages, receive, recover, removeMessageListener, rollback, run, send, setAsyncSend, setAsyncSub, setImplicitAck, setInMessageInterceptors, setMessageConsumerListener, setMessageListener, setOutMessageInterceptors, setQueueMessageReadMax, setTopicAckBufferMax, setTopicActivationThreshold, setTopicPassivationThreshold, setTransacted, start, stop, syncRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.QueueSession
createBrowser, createBrowser, createQueue, createTemporaryQueue
 
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
 

Constructor Detail

QueueSession

QueueSession(Connection cnx,
             boolean transacted,
             int acknowledgeMode,
             RequestMultiplexer mtpx)
       throws javax.jms.JMSException
Constructs a queue session.

Parameters:
cnx - The connection the session belongs to.
transacted - true for a transacted session.
acknowledgeMode - 1 (auto), 2 (client) or 3 (dups ok).
Throws:
javax.jms.JMSException - In case of an invalid acknowledge mode.
Method Detail

toString

public java.lang.String toString()
Returns a String image of this session.

Overrides:
toString in class Session

createSender

public javax.jms.QueueSender createSender(javax.jms.Queue queue)
                                   throws javax.jms.JMSException
API method.

Specified by:
createSender in interface javax.jms.QueueSession
Throws:
javax.jms.IllegalStateException - If the session is closed or if the connection is broken.
javax.jms.JMSException - If the creation fails for any other reason.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String selector)
                                       throws javax.jms.JMSException
API method.

Specified by:
createReceiver in interface javax.jms.QueueSession
Throws:
javax.jms.IllegalStateException - If the session is closed or if the connection is broken.
javax.jms.JMSException - If the creation fails for any other reason.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
                                       throws javax.jms.JMSException
API method.

Specified by:
createReceiver in interface javax.jms.QueueSession
Throws:
javax.jms.IllegalStateException - If the session is closed or if the connection is broken.
javax.jms.JMSException - If the creation fails for any other reason.

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String name,
                                                         java.lang.String selector,
                                                         boolean noLocal)
                                                  throws javax.jms.JMSException
API method.

Specified by:
createDurableSubscriber in interface javax.jms.Session
Overrides:
createDurableSubscriber in class Session
Throws:
javax.jms.IllegalStateException - Systematically.
javax.jms.InvalidDestinationException - if an invalid destination is specified.
javax.jms.JMSException - If the creation fails for any other reason.

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String name)
                                                  throws javax.jms.JMSException
API method.

Specified by:
createDurableSubscriber in interface javax.jms.Session
Overrides:
createDurableSubscriber in class Session
Throws:
javax.jms.IllegalStateException - Systematically.
javax.jms.InvalidDestinationException - if an invalid destination is specified.
javax.jms.JMSException - If the creation fails for any other reason.

createTopic

public javax.jms.Topic createTopic(java.lang.String topicName)
                            throws javax.jms.JMSException
API method.

Specified by:
createTopic in interface javax.jms.Session
Overrides:
createTopic in class Session
Throws:
javax.jms.IllegalStateException - Systematically.
javax.jms.JMSException - If the topic creation failed.

createTemporaryTopic

public javax.jms.TemporaryTopic createTemporaryTopic()
                                              throws javax.jms.JMSException
API method.

Specified by:
createTemporaryTopic in interface javax.jms.Session
Overrides:
createTemporaryTopic in class Session
Throws:
javax.jms.IllegalStateException - Systematically.
javax.jms.JMSException - If the request fails for any other reason.

unsubscribe

public void unsubscribe(java.lang.String name)
                 throws javax.jms.JMSException
API method.

Specified by:
unsubscribe in interface javax.jms.Session
Overrides:
unsubscribe in class Session
Throws:
javax.jms.IllegalStateException - Systematically.
javax.jms.InvalidDestinationException - If the subscription does not exist.
javax.jms.JMSException - If the request fails for any other reason.


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.