Source Code Cross Referenced for ServerDeploy.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » ant » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.ant 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright  2002-2004 The Apache Software Foundation
003:         *
004:         *  Licensed under the Apache License, Version 2.0 (the "License");
005:         *  you may not use this file except in compliance with the License.
006:         *  You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         *  Unless required by applicable law or agreed to in writing, software
011:         *  distributed under the License is distributed on an "AS IS" BASIS,
012:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         *  See the License for the specific language governing permissions and
014:         *  limitations under the License.
015:         *
016:         */package org.objectweb.jonas.ant;
017:
018:        import java.io.File;
019:        import java.util.Enumeration;
020:        import java.util.Vector;
021:        import org.apache.tools.ant.BuildException;
022:        import org.apache.tools.ant.Task;
023:        import org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool;
024:        import org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool;
025:
026:        /**
027:         * Controls hot deployment tools for J2EE servers. This class is used as a
028:         * framework for the creation of vendor specific hot deployment tools.
029:         * @see org.apache.tools.ant.taskdefs.optional.j2ee.HotDeploymentTool
030:         * @see org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
031:         * @see org.apache.tools.ant.taskdefs.optional.j2ee.GenericHotDeploymentTool
032:         * @see org.apache.tools.ant.taskdefs.optional.j2ee.WebLogicHotDeploymentTool
033:         */
034:        public class ServerDeploy extends Task {
035:
036:            /**
037:             * The action to be performed. IE: "deploy", "delete", etc...
038:             */
039:            private String action;
040:
041:            /**
042:             * The source (fully-qualified path) to the component being deployed
043:             */
044:            private File source;
045:
046:            /**
047:             * The vendor specific tool for deploying the component
048:             */
049:            private Vector vendorTools = new Vector();
050:
051:            ///////////////////////////////////////////////////////////////////////////
052:            //
053:            // Place vendor specific tool creations here.
054:            //
055:            ///////////////////////////////////////////////////////////////////////////
056:
057:            /**
058:             * Creates a generic deployment tool. <p>Ant calls this method on creation
059:             * to handle embedded "generic" elements in the ServerDeploy task.
060:             * @param tool An instance of GenericHotDeployment tool, passed in by Ant.
061:             */
062:            public void addGeneric(GenericHotDeploymentTool tool) {
063:            }
064:
065:            /**
066:             * Creates a WebLogic deployment tool, for deployment to WebLogic servers.
067:             * <p>Ant calls this method on creation to handle embedded "weblogic"
068:             * elements in the ServerDeploy task.
069:             * @param tool An instance of WebLogicHotDeployment tool, passed in by Ant.
070:             */
071:            public void addWeblogic(WebLogicHotDeploymentTool tool) {
072:            }
073:
074:            /**
075:             * Creates a JOnAS deployment tool, for deployment to JOnAS servers. <p>Ant
076:             * calls this method on creation to handle embedded "jonas" elements in the
077:             * ServerDeploy task.
078:             * @param tool An instance of JonasHotDeployment tool, passed in by Ant.
079:             */
080:            public void addJonas(JonasHotDeploymentTool tool) {
081:                tool.setTask(this );
082:                vendorTools.addElement(tool);
083:            }
084:
085:            ///////////////////////////////////////////////////////////////////////////
086:            //
087:            // Execute method
088:            //
089:            ///////////////////////////////////////////////////////////////////////////
090:
091:            /**
092:             * Execute the task. <p>This method calls the deploy() method on each of
093:             * the vendor-specific tools in the <code>vendorTools</code> collection.
094:             * This performs the actual process of deployment on each tool.
095:             * @exception org.apache.tools.ant.BuildException if the attributes are
096:             *            invalid or incomplete, or a failure occurs in the deployment
097:             *            process.
098:             */
099:            public void execute() throws BuildException {
100:                for (Enumeration e = vendorTools.elements(); e
101:                        .hasMoreElements();) {
102:                    HotDeploymentTool tool = (HotDeploymentTool) e
103:                            .nextElement();
104:                    tool.validateAttributes();
105:                    tool.deploy();
106:                }
107:            }
108:
109:            ///////////////////////////////////////////////////////////////////////////
110:            //
111:            // Set/get methods
112:            //
113:            ///////////////////////////////////////////////////////////////////////////
114:
115:            /**
116:             * Returns the action field.
117:             * @return A string representing the "action" attribute.
118:             */
119:            public String getAction() {
120:                return action;
121:            }
122:
123:            /**
124:             * The action to be performed, usually "deploy"; required. Some tools
125:             * support additional actions, such as "delete", "list", "undeploy",
126:             * "update"...
127:             * @param action A String representing the "action" attribute.
128:             */
129:            public void setAction(String action) {
130:                this .action = action;
131:            }
132:
133:            /**
134:             * Returns the source field (the path/filename of the component to be
135:             * deployed.
136:             * @return A File object representing the "source" attribute.
137:             */
138:            public File getSource() {
139:                return source;
140:            }
141:
142:            /**
143:             * The filename of the component to be deployed; optional depending upon the
144:             * tool and the action.
145:             * @param source String representing the "source" attribute.
146:             */
147:            public void setSource(File source) {
148:                this.source = source;
149:            }
150:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.