01: /*
02: * @(#)TopicConnectionFactory.java 1.15 02/04/09
03: *
04: * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * SUN PROPRIETARY/CONFIDENTIAL.
07: * This software is the proprietary information of Sun Microsystems, Inc.
08: * Use is subject to license terms.
09: *
10: */
11:
12: package javax.jms;
13:
14: /** A client uses a <CODE>TopicConnectionFactory</CODE> object to create
15: * <CODE>TopicConnection</CODE> objects with a publish/subscribe JMS provider.
16: *
17: * <P>A<CODE> TopicConnectionFactory</CODE> can be used to create a
18: * <CODE>TopicConnection</CODE>, from which specialized topic-related objects
19: * can be created. A more general, and recommended approach
20: * is to use the <CODE>ConnectionFactory</CODE> object.
21: *
22: * <P> The <CODE>TopicConnectionFactory</CODE> object
23: * should be used to support existing code.
24: *
25: * @version 1.1 - February 2, 2002
26: * @author Mark Hapner
27: * @author Rich Burridge
28: * @author Kate Stout
29: *
30: * @see javax.jms.ConnectionFactory
31: */
32:
33: public interface TopicConnectionFactory extends ConnectionFactory {
34:
35: /** Creates a topic connection with the default user identity.
36: * The connection is created in stopped mode. No messages
37: * will be delivered until the <code>Connection.start</code> method
38: * is explicitly called.
39: *
40: * @return a newly created topic connection
41: *
42: * @exception JMSException if the JMS provider fails to create a topic
43: * connection due to some internal error.
44: * @exception JMSSecurityException if client authentication fails due to
45: * an invalid user name or password.
46: */
47:
48: TopicConnection createTopicConnection() throws JMSException;
49:
50: /** Creates a topic connection with the specified user identity.
51: * The connection is created in stopped mode. No messages
52: * will be delivered until the <code>Connection.start</code> method
53: * is explicitly called.
54: *
55: * @param userName the caller's user name
56: * @param password the caller's password
57: *
58: * @return a newly created topic connection
59: *
60: * @exception JMSException if the JMS provider fails to create a topic
61: * connection due to some internal error.
62: * @exception JMSSecurityException if client authentication fails due to
63: * an invalid user name or password.
64: */
65:
66: TopicConnection createTopicConnection(String userName,
67: String password) throws JMSException;
68: }
|