Google

JBoss API: Class JmsSession

org.jboss.jms.ra
Class JmsSession

java.lang.Object
  |
  +--org.jboss.jms.ra.JmsSession
All Implemented Interfaces:
javax.jms.QueueSession, java.lang.Runnable, javax.jms.Session, javax.jms.TopicSession

public class JmsSession
extends java.lang.Object
implements javax.jms.QueueSession, javax.jms.TopicSession

Adapts the JMS QueueSession and TopicSession API to a JmsManagedConnection.

Created: Tue Apr 17 22:39:45 2001

Version:
$Revision: 1.1.4.2 $
Author:
Peter Antman., Jason Dillon.

Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Constructor Summary
JmsSession(JmsManagedConnection mc)
          Construct a JmsSession.
 
Method Summary
 void close()
          Closes the session.
 void commit()
           
 javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
           
 javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector)
           
 javax.jms.BytesMessage createBytesMessage()
           
 javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name)
           
 javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name, java.lang.String messageSelector, boolean noLocal)
           
 javax.jms.MapMessage createMapMessage()
           
 javax.jms.Message createMessage()
           
 javax.jms.ObjectMessage createObjectMessage()
           
 javax.jms.ObjectMessage createObjectMessage(java.io.Serializable object)
           
 javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
           
 javax.jms.Queue createQueue(java.lang.String queueName)
           
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
           
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String messageSelector)
           
 javax.jms.QueueSender createSender(javax.jms.Queue queue)
           
 javax.jms.StreamMessage createStreamMessage()
           
 javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
           
 javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic, java.lang.String messageSelector, boolean noLocal)
           
 javax.jms.TemporaryQueue createTemporaryQueue()
           
 javax.jms.TemporaryTopic createTemporaryTopic()
           
 javax.jms.TextMessage createTextMessage()
           
 javax.jms.TextMessage createTextMessage(java.lang.String string)
           
 javax.jms.Topic createTopic(java.lang.String topicName)
           
 javax.jms.MessageListener getMessageListener()
          Always throws an Exception.
 boolean getTransacted()
           
 void recover()
           
 void rollback()
           
 void run()
          Always throws an Error.
 void setMessageListener(javax.jms.MessageListener listener)
          Always throws an Exception.
 void unsubscribe(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsSession

public JmsSession(JmsManagedConnection mc)
Construct a JmsSession.
Parameters:
mc - The managed connection for this session.
Method Detail

createBytesMessage

public javax.jms.BytesMessage createBytesMessage()
                                          throws javax.jms.JMSException
Specified by:
createBytesMessage in interface javax.jms.Session

createMapMessage

public javax.jms.MapMessage createMapMessage()
                                      throws javax.jms.JMSException
Specified by:
createMapMessage in interface javax.jms.Session

createMessage

public javax.jms.Message createMessage()
                                throws javax.jms.JMSException
Specified by:
createMessage in interface javax.jms.Session

createObjectMessage

public javax.jms.ObjectMessage createObjectMessage()
                                            throws javax.jms.JMSException
Specified by:
createObjectMessage in interface javax.jms.Session

createObjectMessage

public javax.jms.ObjectMessage createObjectMessage(java.io.Serializable object)
                                            throws javax.jms.JMSException
Specified by:
createObjectMessage in interface javax.jms.Session

createStreamMessage

public javax.jms.StreamMessage createStreamMessage()
                                            throws javax.jms.JMSException
Specified by:
createStreamMessage in interface javax.jms.Session

createTextMessage

public javax.jms.TextMessage createTextMessage()
                                        throws javax.jms.JMSException
Specified by:
createTextMessage in interface javax.jms.Session

createTextMessage

public javax.jms.TextMessage createTextMessage(java.lang.String string)
                                        throws javax.jms.JMSException
Specified by:
createTextMessage in interface javax.jms.Session

getTransacted

public boolean getTransacted()
                      throws javax.jms.JMSException
Specified by:
getTransacted in interface javax.jms.Session

getMessageListener

public javax.jms.MessageListener getMessageListener()
                                             throws javax.jms.JMSException
Always throws an Exception.
Specified by:
getMessageListener in interface javax.jms.Session
Throws:
javax.jms.IllegalStateException - Method not allowed.

setMessageListener

public void setMessageListener(javax.jms.MessageListener listener)
                        throws javax.jms.JMSException
Always throws an Exception.
Specified by:
setMessageListener in interface javax.jms.Session
Throws:
javax.jms.IllegalStateException - Method not allowed.

run

public void run()
Always throws an Error.
Specified by:
run in interface java.lang.Runnable
Throws:
java.lang.Error - Method not allowed.

close

public void close()
           throws javax.jms.JMSException
Closes the session. Sends a ConnectionEvent.CONNECTION_CLOSED to the managed connection.
Specified by:
close in interface javax.jms.Session
Throws:
javax.jms.JMSException - Failed to close session.

commit

public void commit()
            throws javax.jms.JMSException
Specified by:
commit in interface javax.jms.Session

rollback

public void rollback()
              throws javax.jms.JMSException
Specified by:
rollback in interface javax.jms.Session

recover

public void recover()
             throws javax.jms.JMSException
Specified by:
recover in interface javax.jms.Session

createTopic

public javax.jms.Topic createTopic(java.lang.String topicName)
                            throws javax.jms.JMSException
Specified by:
createTopic in interface javax.jms.TopicSession

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
                                           throws javax.jms.JMSException
Specified by:
createSubscriber in interface javax.jms.TopicSession

createSubscriber

public javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic,
                                                  java.lang.String messageSelector,
                                                  boolean noLocal)
                                           throws javax.jms.JMSException
Specified by:
createSubscriber in interface javax.jms.TopicSession

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String name)
                                                  throws javax.jms.JMSException
Specified by:
createDurableSubscriber in interface javax.jms.TopicSession

createDurableSubscriber

public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
                                                         java.lang.String name,
                                                         java.lang.String messageSelector,
                                                         boolean noLocal)
                                                  throws javax.jms.JMSException
Specified by:
createDurableSubscriber in interface javax.jms.TopicSession

createPublisher

public javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
                                         throws javax.jms.JMSException
Specified by:
createPublisher in interface javax.jms.TopicSession

createTemporaryTopic

public javax.jms.TemporaryTopic createTemporaryTopic()
                                              throws javax.jms.JMSException
Specified by:
createTemporaryTopic in interface javax.jms.TopicSession

unsubscribe

public void unsubscribe(java.lang.String name)
                 throws javax.jms.JMSException
Specified by:
unsubscribe in interface javax.jms.TopicSession

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
                                     throws javax.jms.JMSException
Specified by:
createBrowser in interface javax.jms.QueueSession

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector)
                                     throws javax.jms.JMSException
Specified by:
createBrowser in interface javax.jms.QueueSession

createQueue

public javax.jms.Queue createQueue(java.lang.String queueName)
                            throws javax.jms.JMSException
Specified by:
createQueue in interface javax.jms.QueueSession

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
                                       throws javax.jms.JMSException
Specified by:
createReceiver in interface javax.jms.QueueSession

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String messageSelector)
                                       throws javax.jms.JMSException
Specified by:
createReceiver in interface javax.jms.QueueSession

createSender

public javax.jms.QueueSender createSender(javax.jms.Queue queue)
                                   throws javax.jms.JMSException
Specified by:
createSender in interface javax.jms.QueueSession

createTemporaryQueue

public javax.jms.TemporaryQueue createTemporaryQueue()
                                              throws javax.jms.JMSException
Specified by:
createTemporaryQueue in interface javax.jms.QueueSession


Copyright © 2000 The JBoss Organization. All Rights Reserved.