KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jms > TopicConnectionFactory


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24
25 package javax.jms;
26
27 /** A client uses a <CODE>TopicConnectionFactory</CODE> object to create
28   * <CODE>TopicConnection</CODE> objects with a publish/subscribe JMS provider.
29   *
30   * <P>A<CODE> TopicConnectionFactory</CODE> can be used to create a
31   * <CODE>TopicConnection</CODE>, from which specialized topic-related objects
32   * can be created. A more general, and recommended approach
33   * is to use the <CODE>ConnectionFactory</CODE> object.
34   *
35   * <P> The <CODE>TopicConnectionFactory</CODE> object
36   * should be used to support existing code.
37   *
38   * @version 1.1 - February 2, 2002
39   * @author Mark Hapner
40   * @author Rich Burridge
41   * @author Kate Stout
42   *
43   * @see javax.jms.ConnectionFactory
44   */

45
46 public interface TopicConnectionFactory extends ConnectionFactory JavaDoc {
47
48     /** Creates a topic connection with the default user identity.
49       * The connection is created in stopped mode. No messages
50       * will be delivered until the <code>Connection.start</code> method
51       * is explicitly called.
52       *
53       * @return a newly created topic connection
54       *
55       * @exception JMSException if the JMS provider fails to create a topic
56       * connection due to some internal error.
57       * @exception JMSSecurityException if client authentication fails due to
58       * an invalid user name or password.
59       */

60
61     TopicConnection JavaDoc
62     createTopicConnection() throws JMSException JavaDoc;
63
64
65     /** Creates a topic connection with the specified user identity.
66       * The connection is created in stopped mode. No messages
67       * will be delivered until the <code>Connection.start</code> method
68       * is explicitly called.
69       *
70       * @param userName the caller's user name
71       * @param password the caller's password
72       *
73       * @return a newly created topic connection
74       *
75       * @exception JMSException if the JMS provider fails to create a topic
76       * connection due to some internal error.
77       * @exception JMSSecurityException if client authentication fails due to
78       * an invalid user name or password.
79       */

80
81     TopicConnection JavaDoc
82     createTopicConnection(String JavaDoc userName, String JavaDoc password)
83                          throws JMSException JavaDoc;
84 }
85
Popular Tags