KickJava   Java API By Example, From Geeks To Geeks.

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


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.XATopicConnectionFactory</code> interface.
31  */

32 public abstract class XATopicConnectionFactory
33                 extends XAConnectionFactory
34                 implements javax.jms.XATopicConnectionFactory JavaDoc
35 {
36   /**
37    * Constructs an <code>XATopicConnectionFactory</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 XATopicConnectionFactory(String JavaDoc host, int port) {
44     super(host, port);
45   }
46
47   /**
48    * Constructs an <code>XATopicConnectionFactory</code> dedicated to a
49    * given server.
50    *
51    * @param url : joram ha url
52    */

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

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

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

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

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

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

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