KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > client > jms > XATopicSession


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2004 - Bull SA
4  * Copyright (C) 2001 - ScalAgent Distributed Technologies
5  * Copyright (C) 1996 - Dyade
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA.
21  *
22  * Initial developer(s): Frederic Maistre (INRIA)
23  * Contributor(s):
24  */

25 package org.objectweb.joram.client.jms;
26
27 import javax.jms.JMSException JavaDoc;
28 import javax.jms.TopicSubscriber JavaDoc;
29
30 /**
31  * Implements the <code>javax.jms.XATopicSession</code> interface.
32  */

33 public class XATopicSession extends XASession
34                             implements javax.jms.XATopicSession JavaDoc
35 {
36   /**
37    * Constructs an <code>XATopicSession</code> instance.
38    *
39    * @param cnx The connection the session belongs to.
40    * @param rm The resource manager.
41    *
42    * @exception JMSException Actually never thrown.
43    */

44   XATopicSession(XATopicConnection cnx,
45                  TopicSession ts,
46                  XAResourceMngr rm) throws JMSException JavaDoc
47   {
48     super(cnx, ts, rm);
49   }
50
51   
52   /** Returns a String image of this session. */
53   public String JavaDoc toString()
54   {
55     return "XATopicSess:" + sess.getId();
56   }
57
58
59   /** API method. */
60   public javax.jms.TopicSession JavaDoc getTopicSession() throws JMSException JavaDoc
61   {
62     return (javax.jms.TopicSession JavaDoc) sess;
63   }
64
65   /**
66    * Delegates the call to the wrapped JMS session.
67    */

68   public TopicSubscriber createSubscriber(javax.jms.Topic JavaDoc topic,
69                                           String JavaDoc selector,
70                                           boolean noLocal)
71          throws JMSException JavaDoc
72   {
73     return ((TopicSession) sess).createSubscriber(topic, selector, noLocal);
74   }
75
76   /**
77    * Delegates the call to the wrapped JMS session.
78    */

79   public TopicSubscriber createSubscriber(javax.jms.Topic JavaDoc topic)
80          throws JMSException JavaDoc
81   {
82     return ((TopicSession) sess).createSubscriber(topic);
83   }
84 }
85
Popular Tags