KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.*;
28
29 import javax.jms.JMSException JavaDoc;
30
31 /**
32  * Implements the <code>javax.jms.XAQueueSession</code> interface.
33  */

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

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

69   public javax.jms.QueueSender JavaDoc createSender(Queue queue)
70          throws JMSException JavaDoc
71   {
72     return ((QueueSession) sess).createSender(queue);
73   }
74
75   /**
76    * Delegates the call to the wrapped JMS session.
77    */

78   public javax.jms.QueueReceiver JavaDoc createReceiver(Queue queue, String JavaDoc selector)
79          throws JMSException JavaDoc
80   {
81     return ((QueueSession) sess).createReceiver(queue, selector);
82   }
83
84   /**
85    * Delegates the call to the wrapped JMS session.
86    */

87   public javax.jms.QueueReceiver JavaDoc createReceiver(Queue queue)
88          throws JMSException JavaDoc
89   {
90     return ((QueueSession) sess).createReceiver(queue);
91   }
92 }
93
Popular Tags