Source Code Cross Referenced for QueueSession.java in  » 6.0-JDK-Modules » JMS » javax » jms » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » JMS » javax.jms 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)QueueSession.java	1.26 02/04/09
003:         *
004:         * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
005:         *
006:         *  SUN PROPRIETARY/CONFIDENTIAL.
007:         * This software is the proprietary information of Sun Microsystems, Inc.  
008:         * Use is subject to license terms.
009:         * 
010:         */
011:
012:        package javax.jms;
013:
014:        /** A <CODE>QueueSession</CODE> object provides methods for creating 
015:         * <CODE>QueueReceiver</CODE>, <CODE>QueueSender</CODE>, 
016:         * <CODE>QueueBrowser</CODE>, and <CODE>TemporaryQueue</CODE> objects.
017:         *
018:         * <P>If there are messages that have been received but not acknowledged 
019:         * when a <CODE>QueueSession</CODE> terminates, these messages will be retained 
020:         * and redelivered when a consumer next accesses the queue.
021:         *
022:         *<P>A <CODE>QueueSession</CODE> is used for creating Point-to-Point specific
023:         * objects. In general, use the <CODE>Session</CODE> object. 
024:         * The <CODE>QueueSession</CODE> is used to support
025:         * existing code. Using the <CODE>Session</CODE> object simplifies the 
026:         * programming model, and allows transactions to be used across the two 
027:         * messaging domains.
028:         * 
029:         * <P>A <CODE>QueueSession</CODE> cannot be used to create objects specific to the 
030:         * publish/subscribe domain. The following methods inherit from 
031:         * <CODE>Session</CODE>, but must throw an
032:         * <CODE>IllegalStateException</CODE> 
033:         * if they are used from <CODE>QueueSession</CODE>:
034:         *<UL>
035:         *   <LI><CODE>createDurableSubscriber</CODE>
036:         *   <LI><CODE>createTemporaryTopic</CODE>
037:         *   <LI><CODE>createTopic</CODE>
038:         *   <LI><CODE>unsubscribe</CODE>
039:         * </UL>
040:         *
041:         * @version     1.1 - April 2, 2002
042:         * @author      Mark Hapner
043:         * @author      Rich Burridge
044:         * @author      Kate Stout
045:         *
046:         * @see         javax.jms.Session
047:         * @see         javax.jms.QueueConnection#createQueueSession(boolean, int)
048:         * @see         javax.jms.XAQueueSession#getQueueSession()
049:         */
050:
051:        public interface QueueSession extends Session {
052:
053:            /** Creates a queue identity given a <CODE>Queue</CODE> name.
054:             *
055:             * <P>This facility is provided for the rare cases where clients need to
056:             * dynamically manipulate queue identity. It allows the creation of a
057:             * queue identity with a provider-specific name. Clients that depend 
058:             * on this ability are not portable.
059:             *
060:             * <P>Note that this method is not for creating the physical queue. 
061:             * The physical creation of queues is an administrative task and is not
062:             * to be initiated by the JMS API. The one exception is the
063:             * creation of temporary queues, which is accomplished with the 
064:             * <CODE>createTemporaryQueue</CODE> method.
065:             *
066:             * @param queueName the name of this <CODE>Queue</CODE>
067:             *
068:             * @return a <CODE>Queue</CODE> with the given name
069:             *
070:             * @exception JMSException if the session fails to create a queue
071:             *                         due to some internal error.
072:             */
073:
074:            Queue createQueue(String queueName) throws JMSException;
075:
076:            /** Creates a <CODE>QueueReceiver</CODE> object to receive messages from the
077:             * specified queue.
078:             *
079:             * @param queue the <CODE>Queue</CODE> to access
080:             *
081:             * @exception JMSException if the session fails to create a receiver
082:             *                         due to some internal error.
083:             * @exception InvalidDestinationException if an invalid queue is specified.
084:             */
085:
086:            QueueReceiver createReceiver(Queue queue) throws JMSException;
087:
088:            /** Creates a <CODE>QueueReceiver</CODE> object to receive messages from the 
089:             * specified queue using a message selector.
090:             *  
091:             * @param queue the <CODE>Queue</CODE> to access
092:             * @param messageSelector only messages with properties matching the
093:             * message selector expression are delivered. A value of null or
094:             * an empty string indicates that there is no message selector 
095:             * for the message consumer.
096:             *  
097:             * @exception JMSException if the session fails to create a receiver
098:             *                         due to some internal error.
099:             * @exception InvalidDestinationException if an invalid queue is specified.
100:             * @exception InvalidSelectorException if the message selector is invalid.
101:             *
102:             */
103:
104:            QueueReceiver createReceiver(Queue queue, String messageSelector)
105:                    throws JMSException;
106:
107:            /** Creates a <CODE>QueueSender</CODE> object to send messages to the 
108:             * specified queue.
109:             *
110:             * @param queue the <CODE>Queue</CODE> to access, or null if this is an 
111:             * unidentified producer
112:             *
113:             * @exception JMSException if the session fails to create a sender
114:             *                         due to some internal error.
115:             * @exception InvalidDestinationException if an invalid queue is specified.
116:             */
117:
118:            QueueSender createSender(Queue queue) throws JMSException;
119:
120:            /** Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on 
121:             * the specified queue.
122:             *
123:             * @param queue the <CODE>Queue</CODE> to access
124:             *
125:             * @exception JMSException if the session fails to create a browser
126:             *                         due to some internal error.
127:             * @exception InvalidDestinationException if an invalid queue is specified.
128:             */
129:
130:            QueueBrowser createBrowser(Queue queue) throws JMSException;
131:
132:            /** Creates a <CODE>QueueBrowser</CODE> object to peek at the messages on 
133:             * the specified queue using a message selector.
134:             *  
135:             * @param queue the <CODE>Queue</CODE> to access
136:             * @param messageSelector only messages with properties matching the
137:             * message selector expression are delivered. A value of null or
138:             * an empty string indicates that there is no message selector 
139:             * for the message consumer.
140:             *  
141:             * @exception JMSException if the session fails to create a browser
142:             *                         due to some internal error.
143:             * @exception InvalidDestinationException if an invalid queue is specified.
144:             * @exception InvalidSelectorException if the message selector is invalid.
145:             */
146:
147:            QueueBrowser createBrowser(Queue queue, String messageSelector)
148:                    throws JMSException;
149:
150:            /** Creates a <CODE>TemporaryQueue</CODE> object. Its lifetime will be that 
151:             * of the <CODE>QueueConnection</CODE> unless it is deleted earlier.
152:             *
153:             * @return a temporary queue identity
154:             *
155:             * @exception JMSException if the session fails to create a temporary queue
156:             *                         due to some internal error.
157:             */
158:
159:            TemporaryQueue createTemporaryQueue() throws JMSException;
160:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.