Source Code Cross Referenced for ServiceUnitManager.java in  » ESB » open-esb » javax » jbi » component » 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 » open esb » javax.jbi.component 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * BEGIN_HEADER - DO NOT EDIT
003:         *
004:         * The contents of this file are subject to the terms
005:         * of the Common Development and Distribution License
006:         * (the "License").  You may not use this file except
007:         * in compliance with the License.
008:         *
009:         * You can obtain a copy of the license at
010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011:         * See the License for the specific language governing
012:         * permissions and limitations under the License.
013:         *
014:         * When distributing Covered Code, include this CDDL
015:         * HEADER in each file and include the License file at
016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017:         * If applicable add the following below this CDDL HEADER,
018:         * with the fields enclosed by brackets "[]" replaced with
019:         * your own identifying information: Portions Copyright
020:         * [year] [name of copyright owner]
021:         */
022:
023:        /*
024:         * @(#)ServiceUnitManager.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:        package javax.jbi.component;
030:
031:        import javax.jbi.management.DeploymentException;
032:
033:        /**
034:         * This interface defines component-supplied methods for managing service
035:         * unit deployments, and is implemented by the component. The JBI implementation
036:         * queries the component for the implementation of this interface using the
037:         * {@link Component#getServiceUnitManager()} method.
038:         *
039:         * @author JSR208 Expert Group
040:         */
041:        public interface ServiceUnitManager {
042:            /**
043:             * Deploy a Service Unit to the component. This is called by the JBI
044:             * implementation in order to deploy the given artifact to the implementing
045:             * component.
046:             * <p>
047:             * Upon successful deployment, a non-empty result string must be returned,
048:             * that starts with the JBI-defined component-task-result element.
049:             * For example:
050:             * <pre>
051:             * &lt;component-task-result&gt;
052:             *   &lt;component-name&gt;BC1&lt;/component-name&gt;
053:             *   &lt;component-task-result-details
054:             *     xmlns="http://java.sun.com/xml/ns/jbi/management-message"&gt;
055:             *       &lt;task-result-details&gt;
056:             *           &lt;task-id>deploy&lt;/task-id&gt;
057:             *           &lt;task-result>SUCCESS&lt;/task-result&gt;
058:             *       &lt;/task-result-details&gt;
059:             *   &lt;/component-task-result-details&gt;
060:             * &lt;/component-task-result&gt;
061:             * </pre>
062:             * A failed deployment of the service unit must be reported using the
063:             * <code>component-task-result</code> element as well; the
064:             * <code>task-result</code> must be set to FAILED.
065:             *
066:             * @param serviceUnitName name of the service unit being deployed; must be
067:             *        non-null and non-empty and unique among service units already
068:             *        deployed to the component.
069:             * @param serviceUnitRootPath path of the service unit artifact root, in
070:             *        platform specific format; must be non-null and non-empty.
071:             * @return a deployment status message, which is an XML string that conforms
072:             *         to the schema given in the <i>MBean Status and Result Strings</i>
073:             *         section of the <i><b>Management</b></i> chapter of the JBI
074:             *         specification; must be non-null and non-empty.
075:             * @exception DeploymentException if the deployment operation is
076:             *            unsuccessful.
077:             */
078:            String deploy(String serviceUnitName, String serviceUnitRootPath)
079:                    throws DeploymentException;
080:
081:            /**
082:             * Initialize the given deployed service unit. This is the first phase of
083:             * a two-phase start, where the component must prepare to receive service
084:             * requests related to the deployment (if any).
085:             * <p>
086:             * The serviceUnitRootPath parameter is provided to facilitate restart of
087:             * the component. This allows simple components to rely entirely on JBI's
088:             * ability to persist deployment information, avoiding the need for the
089:             * component to provide its own persistence mechanism.
090:             *
091:             * @param serviceUnitName name of the service unit being initialized; must
092:             *        be non-null, non-empty, and match the name of a previously
093:             *        deployed (but not yet undeployed) service unit.
094:             * @param serviceUnitRootPath path of the service unit artifact root, in
095:             *        platform specific format; must be non-null and non-empty.
096:             * @exception DeploymentException if the service unit is not deployed, or
097:             *            if it is in an incorrect state.
098:             */
099:            void init(String serviceUnitName, String serviceUnitRootPath)
100:                    throws DeploymentException;
101:
102:            /**
103:             * Start the deployed service unit. This is the second phase of a two-phase
104:             * start, where the component can now initiate service requests related to
105:             * the deployment.
106:             *
107:             * @param serviceUnitName the name of the service unit being started; must
108:             *        be non-null, non-empty, and match the name of a previously
109:             *        deployed (but not yet undeployed) service unit.
110:             * @exception DeploymentException if the service unit is not deployed, or
111:             *           if it is in an incorrect state.
112:             */
113:            void start(String serviceUnitName) throws DeploymentException;
114:
115:            /**
116:             * Stop the deployed service unit. This causes the component to cease
117:             * generating service requests related to the given service unit. This
118:             * returns the service unit to a state equivalent to after
119:             * {@link #init(String, String)} was called.
120:             *
121:             * @param serviceUnitName name of the service unit being stopped; must
122:             *        be non-null, non-empty, and match the name of a previously
123:             *        deployed (but not yet undeployed) service unit.
124:             * @exception DeploymentException if the service unit is not deployed, or
125:             *            if it is in an incorrect state.
126:             */
127:            void stop(String serviceUnitName) throws DeploymentException;
128:
129:            /**
130:             * Shut down the deployment. This causes the deployment to return to the
131:             * to the state it was in after {@link #deploy(String, String)}, and before
132:             * {@link #init(String, String)}.
133:             *
134:             * @param serviceUnitName name of the service unit being shut down; must
135:             *        be non-null, non-empty, and match the name of a previously
136:             *        deployed (but not yet undeployed) service unit.
137:             * @exception DeploymentException if the service unit is not deployed, or
138:             *            if it is in an incorrect state.
139:             */
140:            void shutDown(String serviceUnitName) throws DeploymentException;
141:
142:            /**
143:             * Undeploy a service unit from the component. The service unit must be
144:             * shut down to undeploy it.
145:             *
146:             * @param serviceUnitName name of the service unit being undeployed; must
147:             *        be non-null, non-empty, and match the name of a previously
148:             *        deployed (but not yet undeployed) service unit.
149:             * @param serviceUnitRootPath path of the service unit artifact root, in
150:             *        platform specific format; must be non-null and non-empty.
151:             * @return deployment status message, which is an XML string that conforms
152:             *         to the <code>component-task-result</code> type from
153:             *         the schema given in the <i>MBean Status and Result Strings</i>
154:             *         section of the <i><b>Management</b></i> chapter of the JBI
155:             *         specification; must be non-null and non-empty.
156:             * @exception DeploymentException if undeployment operation is unsuccessful,
157:             *            or if the service unit is in an incorrect state.
158:             */
159:            String undeploy(String serviceUnitName, String serviceUnitRootPath)
160:                    throws DeploymentException;
161:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.