KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

32 public abstract class XAQueueConnectionFactory
33                 extends XAConnectionFactory
34                 implements javax.jms.XAQueueConnectionFactory JavaDoc
35 {
36   /**
37    * Constructs an <code>XAQueueConnectionFactory</code> dedicated to a
38    * given server.
39    *
40    * @param host Name or IP address of the server's host.
41    * @param port Server's listening port.
42    */

43   public XAQueueConnectionFactory(String JavaDoc host, int port) {
44     super(host, port);
45   }
46
47   /**
48    * Constructs an <code>XAQueueConnectionFactory</code> dedicated to a
49    * given server.
50    *
51    * @param url : joram ha url
52    */

53   public XAQueueConnectionFactory(String JavaDoc url) {
54     super(url);
55   }
56
57
58
59   /** Returns a string view of the connection factory. */
60   public String JavaDoc toString() {
61     return "XAQCF:" + params.getHost() + "-" + params.getPort();
62   }
63
64   /**
65    * API method, implemented according to the communication protocol.
66    *
67    * @exception JMSSecurityException If the user identification is incorrect.
68    * @exception IllegalStateException If the server is not listening.
69    */

70   public abstract javax.jms.XAQueueConnection JavaDoc
71       createXAQueueConnection(String JavaDoc name, String JavaDoc password)
72     throws JMSException JavaDoc;
73
74   /**
75    * API method.
76    *
77    * @exception JMSSecurityException If the default identification is
78    * incorrect.
79    * @exception IllegalStateException If the server is not listening.
80    */

81   public javax.jms.XAQueueConnection JavaDoc createXAQueueConnection()
82     throws JMSException JavaDoc {
83     return createXAQueueConnection(ConnectionFactory.getDefaultLogin(),
84                                    ConnectionFactory.getDefaultPassword());
85   }
86
87   /**
88    * Method inherited from interface <code>QueueConnectionFactory</code>,
89    * implemented according to the communication protocol.
90    *
91    * @exception JMSSecurityException If the user identification is incorrect.
92    * @exception IllegalStateException If the server is not listening.
93    */

94   public abstract javax.jms.QueueConnection JavaDoc
95       createQueueConnection(String JavaDoc name, String JavaDoc password)
96     throws JMSException JavaDoc;
97
98   /**
99    * Method inherited from interface <code>QueueConnectionFactory</code>.
100    *
101    * @exception JMSSecurityException If the default identification is
102    * incorrect.
103    * @exception IllegalStateException If the server is not listening.
104    */

105   public javax.jms.QueueConnection JavaDoc createQueueConnection() throws JMSException JavaDoc
106     {
107       return createQueueConnection(ConnectionFactory.getDefaultLogin(),
108                                    ConnectionFactory.getDefaultPassword());
109     }
110
111   /**
112    * Method inherited from interface <code>ConnectionFactory</code>,
113    * implemented according to the communication protocol..
114    *
115    * @exception JMSSecurityException If the user identification is incorrect.
116    * @exception IllegalStateException If the server is not listening.
117    */

118   public abstract javax.jms.Connection JavaDoc
119       createConnection(String JavaDoc name, String JavaDoc password)
120     throws JMSException JavaDoc;
121
122   /**
123    * Method inherited from interface <code>ConnectionFactory</code>.
124    *
125    * @exception JMSSecurityException If the default identification is
126    * incorrect.
127    * @exception IllegalStateException If the server is not listening.
128    */

129   public javax.jms.Connection JavaDoc createConnection() throws JMSException JavaDoc {
130     return createConnection(ConnectionFactory.getDefaultLogin(),
131                             ConnectionFactory.getDefaultPassword());
132   }
133 }
134
Popular Tags