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 26 package javax.jms; 27 28 /** A client uses a <CODE>QueueConnectionFactory</CODE> object to create 29 * <CODE>QueueConnection</CODE> objects with a point-to-point JMS provider. 30 * 31 * <P><CODE>QueueConnectionFactory</CODE> can be used to create a 32 * <CODE>QueueConnection</CODE>, from which specialized queue-related objects 33 * can be created. A more general, and recommended, approach 34 * is to use the <CODE>ConnectionFactory</CODE> object. 35 * 36 *<P> The <CODE>QueueConnectionFactory</CODE> object 37 * can be used to support existing code that already uses it. 38 * 39 * @version 1.1 - February 2, 2002 40 * @author Mark Hapner 41 * @author Rich Burridge 42 * @author Kate Stout 43 * 44 * @see javax.jms.ConnectionFactory 45 */ 46 47 public interface QueueConnectionFactory extends ConnectionFactory { 48 49 /** Creates a queue connection with the default user identity. 50 * The connection is created in stopped mode. No messages 51 * will be delivered until the <code>Connection.start</code> method 52 * is explicitly called. 53 * 54 . 55 * 56 * @return a newly created queue connection 57 * 58 * @exception JMSException if the JMS provider fails to create the queue 59 * connection due to some internal error. 60 * @exception JMSSecurityException if client authentication fails due to 61 * an invalid user name or password. 62 */ 63 64 QueueConnection 65 createQueueConnection() throws JMSException; 66 67 68 /** Creates a queue connection with the specified user identity. 69 * The connection is created in stopped mode. No messages 70 * will be delivered until the <code>Connection.start</code> method 71 * is explicitly called. 72 * 73 * @param userName the caller's user name 74 * @param password the caller's password 75 * 76 * @return a newly created queue connection 77 * 78 * @exception JMSException if the JMS provider fails to create the queue 79 * connection due to some internal error. 80 * @exception JMSSecurityException if client authentication fails due to 81 * an invalid user name or password. 82 */ 83 84 QueueConnection 85 createQueueConnection(String userName, String password) 86 throws JMSException; 87 } 88