com.caucho.jms.connection
Class QueueSessionImpl

java.lang.Object
  extended by com.caucho.jms.connection.JmsSession
      extended by com.caucho.jms.connection.QueueSessionImpl
All Implemented Interfaces:
ThreadTask, java.lang.Runnable, QueueSession, Session, XAQueueSession, XASession, XAResource

public class QueueSessionImpl
extends JmsSession
implements XAQueueSession, QueueSession

A sample queue session. Lets the client create queues, browsers, etc.


Field Summary
 
Fields inherited from class com.caucho.jms.connection.JmsSession
L, log
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
QueueSessionImpl(ConnectionImpl connection, boolean isTransacted, int ackMode, boolean isXA)
          Creates the session
 
Method Summary
 TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String name)
          Creates a durable subscriber to receive messages.
 TopicSubscriber createDurableSubscriber(Topic topic, java.lang.String name, java.lang.String messageSelector, boolean noLocal)
          Creates a subscriber to receive messages.
 QueueReceiver createReceiver(Queue queue)
          Creates a receiver to receive messages.
 QueueReceiver createReceiver(Queue queue, java.lang.String messageSelector)
          Creates a receiver to receive messages.
 QueueSender createSender(Queue queue)
          Creates a QueueSender to send messages to a queue.
 TemporaryTopic createTemporaryTopic()
          Creates a temporary topic.
 Topic createTopic(java.lang.String topicName)
          Creates a new topic.
 QueueSession getQueueSession()
           
 void unsubscribe(java.lang.String name)
          Unsubscribe from a durable subscription.
 
Methods inherited from class com.caucho.jms.connection.JmsSession
acknowledge, acquireListenSemaphore, addConsumer, checkOpen, close, commit, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, end, forget, getAcknowledgeMode, getClientID, getMessageListener, getPublisherId, getSession, getTransacted, getTransactionTimeout, getXAResource, isActive, isClosed, isSameRM, prepare, recover, recover, releaseListenSemaphore, removeConsumer, rollback, rollback, rollbackImpl, run, send, setMessageListener, setTransactionTimeout, start, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.XASession
commit, getSession, getTransacted, getXAResource, rollback
 
Methods inherited from interface javax.jms.Session
close, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, recover, run, setMessageListener
 
Methods inherited from interface javax.jms.QueueSession
createBrowser, createBrowser, createQueue, createTemporaryQueue
 

Constructor Detail

QueueSessionImpl

public QueueSessionImpl(ConnectionImpl connection,
                        boolean isTransacted,
                        int ackMode,
                        boolean isXA)
                 throws JMSException
Creates the session

Throws:
JMSException
Method Detail

createReceiver

public QueueReceiver createReceiver(Queue queue)
                             throws JMSException
Creates a receiver to receive messages.

Specified by:
createReceiver in interface QueueSession
Parameters:
queue - the queue to receive messages from.
Throws:
JMSException

createReceiver

public QueueReceiver createReceiver(Queue queue,
                                    java.lang.String messageSelector)
                             throws JMSException
Creates a receiver to receive messages.

Specified by:
createReceiver in interface QueueSession
Parameters:
queue - the queue to receive messages from.
messageSelector - query to restrict the messages.
Throws:
JMSException

createSender

public QueueSender createSender(Queue queue)
                         throws JMSException
Creates a QueueSender to send messages to a queue.

Specified by:
createSender in interface QueueSession
Parameters:
queue - the queue to send messages to.
Throws:
JMSException

createTopic

public Topic createTopic(java.lang.String topicName)
                  throws JMSException
Creates a new topic.

Specified by:
createTopic in interface Session
Overrides:
createTopic in class JmsSession
Throws:
JMSException

createTemporaryTopic

public TemporaryTopic createTemporaryTopic()
                                    throws JMSException
Creates a temporary topic.

Specified by:
createTemporaryTopic in interface Session
Overrides:
createTemporaryTopic in class JmsSession
Throws:
JMSException

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               java.lang.String name)
                                        throws JMSException
Creates a durable subscriber to receive messages.

Specified by:
createDurableSubscriber in interface Session
Overrides:
createDurableSubscriber in class JmsSession
Parameters:
topic - the topic to receive messages from.
Throws:
JMSException

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               java.lang.String name,
                                               java.lang.String messageSelector,
                                               boolean noLocal)
                                        throws JMSException
Creates a subscriber to receive messages.

Specified by:
createDurableSubscriber in interface Session
Overrides:
createDurableSubscriber in class JmsSession
Parameters:
topic - the topic to receive messages from.
messageSelector - topic to restrict the messages.
noLocal - if true, don't receive messages we've sent
Throws:
JMSException

unsubscribe

public void unsubscribe(java.lang.String name)
                 throws JMSException
Unsubscribe from a durable subscription.

Specified by:
unsubscribe in interface Session
Overrides:
unsubscribe in class JmsSession
Throws:
JMSException

getQueueSession

public QueueSession getQueueSession()
Specified by:
getQueueSession in interface XAQueueSession