01: /*
02: * @(#)Queue.java 1.16 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 <CODE>Queue</CODE> object encapsulates a provider-specific queue name.
15: * It is the way a client specifies the identity of a queue to JMS API methods.
16: * For those methods that use a <CODE>Destination</CODE> as a parameter, a
17: * <CODE>Queue</CODE> object used as an argument. For example, a queue can
18: * be used to create a <CODE>MessageConsumer</CODE> and a
19: * <CODE>MessageProducer</CODE> by calling:
20: *<UL>
21: *<LI> <CODE>Session.CreateConsumer(Destination destination)</CODE>
22: *<LI> <CODE>Session.CreateProducer(Destination destination)</CODE>
23: *
24: *</UL>
25: *
26: * <P>The actual length of time messages are held by a queue and the
27: * consequences of resource overflow are not defined by the JMS API.
28: *
29: *
30: *
31: * @version 1.1 February 2 - 2000
32: * @author Mark Hapner
33: * @author Rich Burridge
34: * @author Kate Stout
35: *
36: * @see Session#createConsumer(Destination)
37: * @see Session#createProducer(Destination)
38: * @see Session#createQueue(String)
39: * @see QueueSession#createQueue(String)
40: */
41:
42: public interface Queue extends Destination {
43:
44: /** Gets the name of this queue.
45: *
46: * <P>Clients that depend upon the name are not portable.
47: *
48: * @return the queue name
49: *
50: * @exception JMSException if the JMS provider implementation of
51: * <CODE>Queue</CODE> fails to return the queue
52: * name due to some internal
53: * error.
54: */
55:
56: String getQueueName() throws JMSException;
57:
58: /** Returns a string representation of this object.
59: *
60: * @return the provider-specific identity values for this queue
61: */
62:
63: String toString();
64: }
|