Source Code Cross Referenced for Endpoint.java in  » ESB » synapse » org » apache » synapse » endpoints » 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 » synapse » org.apache.synapse.endpoints 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one
003:         *  or more contributor license agreements.  See the NOTICE file
004:         *  distributed with this work for additional information
005:         *  regarding copyright ownership.  The ASF licenses this file
006:         *  to you under the Apache License, Version 2.0 (the
007:         *  "License"); you may not use this file except in compliance
008:         *  with the License.  You may obtain a copy of the License at
009:         *
010:         *   http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         *  Unless required by applicable law or agreed to in writing,
013:         *  software distributed under the License is distributed on an
014:         *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         *  KIND, either express or implied.  See the License for the
016:         *  specific language governing permissions and limitations
017:         *  under the License.
018:         */
019:
020:        package org.apache.synapse.endpoints;
021:
022:        import org.apache.synapse.MessageContext;
023:
024:        /**
025:         * Endpoint defines the behavior common to all Synapse endpoints. Synapse endpoints should be able
026:         * to send the given Synapse message context, rather than just providing the information for sending
027:         * the message. The task a particular endpoint does in its send(...) method is specific to the endpoint.
028:         * For example a loadbalance endpoint may choose another endpoint using its load balance policy and
029:         * call its send(...) method while an address endpoint (leaf level) may send the message to an actual
030:         * endpoint url. Endpoints may contain zero or more endpoints in them and build up a hierarchical
031:         * structure of endpoints.
032:         */
033:        public interface Endpoint {
034:
035:            /**
036:             * Sends the message context according to an endpoint specific behavior.
037:             *
038:             * @param synMessageContext MessageContext to be sent.
039:             */
040:            public void send(MessageContext synMessageContext);
041:
042:            /**
043:             * Endpoints that contain other endpoints should implement this method. It will be called if a
044:             * child endpoint causes an exception. Action to be taken on such failure is up to the implementation.
045:             * But it is good practice to first try addressing the issue. If it can't be addressed propagate the
046:             * exception to parent endpoint by calling parent endpoint's onChildEndpointFail(...) method.
047:             *
048:             * @param endpoint          The child endpoint which caused the exception.
049:             * @param synMessageContext MessageContext that was used in the failed attempt.
050:             */
051:            public void onChildEndpointFail(Endpoint endpoint,
052:                    MessageContext synMessageContext);
053:
054:            /**
055:             * Sets the parent endpoint for the current endpoint.
056:             *
057:             * @param parentEndpoint parent endpoint containing this endpoint. It should handle the onChildEndpointFail(...)
058:             *                       callback.
059:             */
060:            public void setParentEndpoint(Endpoint parentEndpoint);
061:
062:            /**
063:             * Returns the name of the endpoint.
064:             *
065:             * @return Endpoint name.
066:             */
067:            public String getName();
068:
069:            /**
070:             * Sets the name of the endpoint. Local registry use this name as the key for storing the
071:             * endpoint.
072:             *
073:             * @param name Name for the endpoint.
074:             */
075:            public void setName(String name);
076:
077:            /**
078:             * Returns if the endpoint is currently active or not. Messages should not be sent to inactive
079:             * endpoints.
080:             *
081:             * @param synMessageContext MessageContext for the current message. This is required for
082:             *                          IndirectEndpoints where the actual endpoint is retrieved from the MessageContext. Other
083:             *                          Endpoint implementations may ignore this parameter.
084:             * @return true if the endpoint is in active state. false otherwise.
085:             */
086:            public boolean isActive(MessageContext synMessageContext);
087:
088:            /**
089:             * Sets the endpoint as active or inactive. If an endpoint is detected as failed, it should be
090:             * set as inactive. But endpoints may be eventually set as active by the endpoint refresher to
091:             * avoid ignoring endpoints forever.
092:             *
093:             * @param active            true if active. false otherwise.
094:             * @param synMessageContext MessageContext for the current message. This is required for
095:             *                          IndirectEndpoints where the actual endpoint is retrieved from the MessageContext. Other
096:             *                          Endpoint implementations may ignore this parameter.
097:             */
098:            public void setActive(boolean active,
099:                    MessageContext synMessageContext);
100:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.