Source Code Cross Referenced for JUMPMessageDispatcher.java in  » 6.0-JDK-Modules » j2me » com » sun » jump » message » 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 » j2me » com.sun.jump.message 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * Copyright  1990-2006 Sun Microsystems, Inc. All Rights Reserved.
03:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
04:         * 
05:         * This program is free software; you can redistribute it and/or
06:         * modify it under the terms of the GNU General Public License version
07:         * 2 only, as published by the Free Software Foundation. 
08:         * 
09:         * This program is distributed in the hope that it will be useful, but
10:         * WITHOUT ANY WARRANTY; without even the implied warranty of
11:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12:         * General Public License version 2 for more details (a copy is
13:         * included at /legal/license.txt). 
14:         * 
15:         * You should have received a copy of the GNU General Public License
16:         * version 2 along with this work; if not, write to the Free Software
17:         * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18:         * 02110-1301 USA 
19:         * 
20:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21:         * Clara, CA 95054 or visit www.sun.com if you need additional
22:         * information or have any questions. 
23:         */
24:
25:        package com.sun.jump.message;
26:
27:        import java.io.IOException;
28:
29:        /**
30:         * <code>JUMPMessageDispatcher</code> is a high-level construct used to
31:         * read messages from underlying message queues and distribute them to
32:         * listeners.
33:         */
34:        public interface JUMPMessageDispatcher {
35:
36:            /**
37:             * Registers the message type for direct receipt via
38:             * <code>waitForMessage()</code>. This is akin to a reservation of
39:             * the type before blocking on incoming messages.
40:             *
41:             * @return
42:             * opaque object that represents the registration. The token can be
43:             * used to cancel the registaration using
44:             * {@link #cancelRegistration(Object)}
45:             * @throws JUMPMessageDispatcherTypeException if there is already an
46:             * existing handler registration for the message type.
47:             * @throws IOException if there is a problem registering for the
48:             * message type.
49:             */
50:            public Object registerDirect(String messageType)
51:                    throws JUMPMessageDispatcherTypeException, IOException;
52:
53:            /**
54:             * Blocks and waits for a message of type <code>messageType</code>.
55:             * 
56:             * @throws JUMPMessageDispatcherTypeException if there is already
57:             * an existing handler registration for the message type, or if it has not
58:             * been registered via <code>registerDirect()</code>.
59:             *
60:             * @throws JUMPTimedOutException
61:             * @throws JUMPUnblockedException
62:             * @throws IOException
63:             */
64:            public JUMPMessage waitForMessage(String messageType, long timeout)
65:                    throws JUMPMessageDispatcherTypeException,
66:                    JUMPTimedOutException, IOException;
67:
68:            /**
69:             * Registers the message handler for the message type.  This
70:             * starts a daemon thread which will persist until all
71:             * handlers for the message type have been cancelled.  
72:             *
73:             * @return
74:             * opaque object that represents the registration. The token can be
75:             * used to cancel the registaration using
76:             * {@link #cancelRegistration(Object)}
77:             *
78:             * @throws JUMPMessageDispatcherTypeException if the message type was
79:             * registered via <code>registerDirect()</code>.
80:             * @throws IOException if there is a problem registering for the
81:             * message type.
82:             */
83:            public Object registerHandler(String messageType,
84:                    JUMPMessageHandler handler)
85:                    throws JUMPMessageDispatcherTypeException, IOException;
86:
87:            /**
88:             * Removes the registration for the message type. This applies to
89:             * direct registrations as well as handler registrations.
90:             *
91:             * @throws IOException if there is a problem canceling the
92:             * registration.
93:             * @throws IllegalStateException if the registrationToken
94:             * has already been canceled.
95:             */
96:            public void cancelRegistration(Object registrationToken)
97:                    throws IOException;
98:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.