Source Code Cross Referenced for MessageDispatcherFactory.java in  » ESB » mule » org » mule » api » transport » 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 » ESB » mule » org.mule.api.transport 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * $Id: MessageDispatcherFactory.java 10961 2008-02-22 19:01:02Z dfeist $
03:         * --------------------------------------------------------------------------------------
04:         * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
05:         *
06:         * The software in this package is published under the terms of the CPAL v1.0
07:         * license, a copy of which has been included with this distribution in the
08:         * LICENSE.txt file.
09:         */
10:
11:        package org.mule.api.transport;
12:
13:        import org.mule.api.MuleException;
14:        import org.mule.api.endpoint.ImmutableEndpoint;
15:        import org.mule.api.endpoint.OutboundEndpoint;
16:
17:        /**
18:         * <code>MessageDispatcherFactory</code> is a factory interface for managing the
19:         * lifecycles of a transport's message dispatchers. The methods basically implement
20:         * the {@link org.apache.commons.pool.KeyedPoolableObjectFactory} lifecycle, with a
21:         * {@link ImmutableEndpoint} as the key and the dispatcher as pooled object.
22:         */
23:        public interface MessageDispatcherFactory {
24:
25:            /**
26:             * Controls whether dispatchers are cached or created per request. Note that if
27:             * an exception occurs in the dispatcher, it is automatically disposed of and a
28:             * new one is created for the next request. This allows dispatchers to recover
29:             * from loss of connection and other faults. When invoked by
30:             * {@link #validate(OutboundEndpoint, MessageDispatcher)} it takes
31:             * precedence over the dispatcher's own return value of
32:             * {@link MessageDispatcher#validate()}.
33:             *
34:             * @return true if created per request
35:             */
36:            boolean isCreateDispatcherPerRequest();
37:
38:            /**
39:             * Creates a new message dispatcher instance, initialised with the passed
40:             * endpoint. The returned instance should be immediately useable.
41:             * 
42:             * @param endpoint the endoint for which this dispatcher should be created
43:             * @return a properly created <code>MessageDispatcher</code> for this
44:             *         transport
45:             * @throws MuleException if the dispatcher cannot be created
46:             */
47:            MessageDispatcher create(OutboundEndpoint endpoint)
48:                    throws MuleException;
49:
50:            /**
51:             * Invoked <strong>before</strong> the given dispatcher is handed out to a
52:             * client, but <strong>not</strong> after {@link #create(OutboundEndpoint)}.
53:             * 
54:             * @param endpoint the endpoint of the dispatcher
55:             * @param dispatcher the dispatcher to be activated
56:             * @throws MuleException if the dispatcher cannot be activated
57:             */
58:            void activate(OutboundEndpoint endpoint,
59:                    MessageDispatcher dispatcher) throws MuleException;
60:
61:            /**
62:             * Invoked <strong>after</strong> the dispatcher is returned from a client but
63:             * <strong>before</strong> it is prepared for return to its pool via
64:             * {@link #passivate(OutboundEndpoint, MessageDispatcher)}.
65:             * 
66:             * @param endpoint the endpoint of the dispatcher
67:             * @param dispatcher the dispatcher to be validated
68:             * @return <code>true</code> if the dispatcher is valid for reuse,
69:             *         <code>false</code> otherwise.
70:             */
71:            boolean validate(OutboundEndpoint endpoint,
72:                    MessageDispatcher dispatcher);
73:
74:            /**
75:             * Invoked immediately <strong>before</strong> the given dispatcher is returned
76:             * to its pool.
77:             * 
78:             * @param endpoint the endpoint of the dispatcher
79:             * @param dispatcher the dispatcher to be passivated
80:             */
81:            void passivate(OutboundEndpoint endpoint,
82:                    MessageDispatcher dispatcher);
83:
84:            /**
85:             * Invoked when a dispatcher returned <code>false</code> for
86:             * {@link #validate(OutboundEndpoint, MessageDispatcher)}.
87:             * 
88:             * @param endpoint the endpoint of the dispatcher
89:             * @param dispatcher the dispatcher to be validated
90:             */
91:            void destroy(OutboundEndpoint endpoint, MessageDispatcher dispatcher);
92:
93:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.