com.caucho.jms.connection
Class TopicSessionImpl

java.lang.Object
  extended by com.caucho.jms.connection.JmsSession
      extended by com.caucho.jms.connection.TopicSessionImpl
All Implemented Interfaces:
ThreadTask, java.lang.Runnable, Session, TopicSession, XASession, XATopicSession, XAResource

public class TopicSessionImpl
extends JmsSession
implements XATopicSession, TopicSession

A sample topic session. Lets the client create topics, 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
TopicSessionImpl(ConnectionImpl conn, boolean isTransacted, int ackMode, boolean isXA)
           
 
Method Summary
 QueueBrowser createBrowser(Queue queue)
          Creates a QueueBrowser to browse messages in the queue.
 QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector)
          Creates a QueueBrowser to browse messages in the queue.
 TopicPublisher createPublisher(Topic topic)
          Creates a TopicSender to send messages to a topic.
 Queue createQueue(java.lang.String queueName)
          Creates a new queue.
 TopicSubscriber createSubscriber(Topic topic)
          Creates a subscriber to receive messages.
 TopicSubscriber createSubscriber(Topic topic, java.lang.String messageSelector, boolean noLocal)
          Creates a subscriber to receive messages.
 TemporaryQueue createTemporaryQueue()
          Creates a temporary queue.
 TopicSession getTopicSession()
           
 
Methods inherited from class com.caucho.jms.connection.JmsSession
acknowledge, acquireListenSemaphore, addConsumer, checkOpen, close, commit, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, 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, unsubscribe
 
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, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, recover, run, setMessageListener, unsubscribe
 
Methods inherited from interface javax.jms.TopicSession
createDurableSubscriber, createDurableSubscriber, createTemporaryTopic, createTopic, unsubscribe
 

Constructor Detail

TopicSessionImpl

public TopicSessionImpl(ConnectionImpl conn,
                        boolean isTransacted,
                        int ackMode,
                        boolean isXA)
                 throws JMSException
Throws:
JMSException
Method Detail

createPublisher

public TopicPublisher createPublisher(Topic topic)
                               throws JMSException
Creates a TopicSender to send messages to a topic.

Specified by:
createPublisher in interface TopicSession
Parameters:
topic - the topic to send messages to.
Throws:
JMSException

createSubscriber

public TopicSubscriber createSubscriber(Topic topic)
                                 throws JMSException
Creates a subscriber to receive messages.

Specified by:
createSubscriber in interface TopicSession
Parameters:
topic - the topic to receive messages from.
Throws:
JMSException

createSubscriber

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

Specified by:
createSubscriber in interface TopicSession
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

createBrowser

public QueueBrowser createBrowser(Queue queue)
                           throws JMSException
Creates a QueueBrowser to browse messages in the queue.

Specified by:
createBrowser in interface Session
Overrides:
createBrowser in class JmsSession
Parameters:
queue - the queue to send messages to.
Throws:
JMSException

createBrowser

public QueueBrowser createBrowser(Queue queue,
                                  java.lang.String messageSelector)
                           throws JMSException
Creates a QueueBrowser to browse messages in the queue.

Specified by:
createBrowser in interface Session
Overrides:
createBrowser in class JmsSession
Parameters:
queue - the queue to send messages to.
Throws:
JMSException

createQueue

public Queue createQueue(java.lang.String queueName)
                  throws JMSException
Creates a new queue.

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

createTemporaryQueue

public TemporaryQueue createTemporaryQueue()
                                    throws JMSException
Creates a temporary queue.

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

getTopicSession

public TopicSession getTopicSession()
Specified by:
getTopicSession in interface XATopicSession