Save This Page
Home » mq4_2-source-20080707.jar » javax » jms » [javadoc | source]
    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    *
    4    * Copyright 2000-2007 Sun Microsystems, Inc. All rights reserved. 
    5    *
    6    * The contents of this file are subject to the terms of either the GNU
    7    * General Public License Version 2 only ("GPL") or the Common Development
    8    * and Distribution License ("CDDL") (collectively, the "License").  You may
    9    * not use this file except in compliance with the License.  You can obtain
   10    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   11    * or mq/legal/LICENSE.txt.  See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    * 
   14    * When distributing the software, include this License Header Notice in each
   15    * file and include the License file at mq/legal/LICENSE.txt.  Sun designates
   16    * this particular file as subject to the "Classpath" exception as provided by
   17    * Sun in the GPL Version 2 section of the License file that accompanied this
   18    * code.  If applicable, add the following below the License Header, with the
   19    * fields enclosed by brackets [] replaced by your own identifying information:
   20    * "Portions Copyrighted [year] [name of copyright owner]"
   21    * 
   22    * Contributor(s):
   23    * 
   24    * If you wish your version of this file to be governed by only the CDDL or
   25    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   26    * elects to include this software in this distribution under the [CDDL or GPL
   27    * Version 2] license."  If you don't indicate a single choice of license, a
   28    * recipient has the option to distribute your version of this file under
   29    * either the CDDL, the GPL Version 2 or  to extend the choice of license to
   30    * its licensees as provided above.  However, if you add GPL Version 2 code
   31    * and therefore, elected the GPL Version 2 license, then the option applies
   32    * only if the new code is made subject to such option by the copyright holder. 
   33    */
   34   
   35   /*
   36    * @(#)Queue.java	1.18 07/02/07
   37    */ 
   38   
   39   package javax.jms;
   40   
   41   
   42   /** A <CODE>Queue</CODE> object encapsulates a provider-specific queue name. 
   43     * It is the way a client specifies the identity of a queue to JMS API methods.
   44     * For those methods that use a <CODE>Destination</CODE> as a parameter, a 
   45     * <CODE>Queue</CODE> object used as an argument. For example, a queue can
   46     * be used  to create a <CODE>MessageConsumer</CODE> and a 
   47     * <CODE>MessageProducer</CODE>  by calling:
   48     *<UL>
   49     *<LI> <CODE>Session.CreateConsumer(Destination destination)</CODE>
   50     *<LI> <CODE>Session.CreateProducer(Destination destination)</CODE>
   51     *
   52     *</UL>
   53     *
   54     * <P>The actual length of time messages are held by a queue and the 
   55     * consequences of resource overflow are not defined by the JMS API.
   56     *
   57     * @see Session#createConsumer(Destination)
   58     * @see Session#createProducer(Destination)
   59     * @see Session#createQueue(String)
   60     * @see QueueSession#createQueue(String)
   61     */
   62    
   63   public interface Queue extends Destination { 
   64   
   65       /** Gets the name of this queue.
   66         *  
   67         * <P>Clients that depend upon the name are not portable.
   68         *  
   69         * @return the queue name
   70         *  
   71         * @exception JMSException if the JMS provider implementation of 
   72         *                         <CODE>Queue</CODE> fails to return the queue
   73         *                         name due to some internal
   74         *                         error.
   75         */ 
   76    
   77       String
   78       getQueueName() throws JMSException;  
   79   
   80   
   81       /** Returns a string representation of this object.
   82         *
   83         * @return the provider-specific identity values for this queue
   84         */
   85    
   86       String
   87       toString();
   88   }

Save This Page
Home » mq4_2-source-20080707.jar » javax » jms » [javadoc | source]