Source Code Cross Referenced for HandlerDescription.java in  » Web-Services-AXIS2 » kernal » org » apache » axis2 » description » 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 » Web Services AXIS2 » kernal » org.apache.axis2.description 
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.axis2.description;
021:
022:        import org.apache.axiom.om.OMElement;
023:        import org.apache.axis2.AxisFault;
024:        import org.apache.axis2.engine.Handler;
025:        import org.apache.axis2.i18n.Messages;
026:
027:        import java.util.ArrayList;
028:
029:        /**
030:         * Represents the deployment information about the handler
031:         */
032:        public class HandlerDescription implements  ParameterInclude {
033:
034:            /**
035:             * Field className
036:             */
037:            private String className;
038:
039:            private Handler handler;
040:            private String name;
041:            private final ParameterInclude parameterInclude;
042:            private ParameterInclude parent;
043:            private PhaseRule rules;
044:
045:            /**
046:             * Constructor HandlerDescription.
047:             */
048:            public HandlerDescription() {
049:                this .parameterInclude = new ParameterIncludeImpl();
050:                this .rules = new PhaseRule();
051:            }
052:
053:            /**
054:             * Constructor HandlerDescription.
055:             *
056:             * @param name name of handler
057:             */
058:            public HandlerDescription(String name) {
059:                this ();
060:                this .name = name;
061:            }
062:
063:            /**
064:             * Add a Parameter
065:             *
066:             * @param param the Parameter to associate with this HandlerDescription
067:             */
068:            public void addParameter(Parameter param) throws AxisFault {
069:                if (isParameterLocked(param.getName())) {
070:                    throw new AxisFault(Messages.getMessage(
071:                            "paramterlockedbyparent", param.getName()));
072:                } else {
073:                    parameterInclude.addParameter(param);
074:                }
075:            }
076:
077:            public void removeParameter(Parameter param) throws AxisFault {
078:                if (isParameterLocked(param.getName())) {
079:                    throw new AxisFault(Messages.getMessage(
080:                            "paramterlockedbyparent", param.getName()));
081:                } else {
082:                    parameterInclude.removeParameter(param);
083:                }
084:            }
085:
086:            public void deserializeParameters(OMElement parameterElement)
087:                    throws AxisFault {
088:                this .parameterInclude.deserializeParameters(parameterElement);
089:            }
090:
091:            /**
092:             * Method getClassName.
093:             *
094:             * @return Returns String.
095:             */
096:            public String getClassName() {
097:                return className;
098:            }
099:
100:            /**
101:             * @return Returns Handler.
102:             */
103:            public Handler getHandler() {
104:                return handler;
105:            }
106:
107:            /**
108:             * @return Returns QName.
109:             */
110:            public String getName() {
111:                return name;
112:            }
113:
114:            /**
115:             * Get a named Parameter
116:             *
117:             * @param name name of Parameter to search
118:             * @return a Parameter, which may come from us or from some parent up the tree, or null.
119:             */
120:            public Parameter getParameter(String name) {
121:                Parameter parameter = parameterInclude.getParameter(name);
122:                if (parameter == null && parent != null) {
123:                    return parent.getParameter(name);
124:                } else {
125:                    return parameter;
126:                }
127:            }
128:
129:            public ArrayList getParameters() {
130:                return parameterInclude.getParameters();
131:            }
132:
133:            public ParameterInclude getParent() {
134:                return parent;
135:            }
136:
137:            /**
138:             * Method getRules.
139:             *
140:             * @return Returns PhaseRule.
141:             */
142:            public PhaseRule getRules() {
143:                return rules;
144:            }
145:
146:            // to check whether the parameter is locked at any level
147:            public boolean isParameterLocked(String parameterName) {
148:                if (parent != null) {
149:                    if (parent.isParameterLocked(parameterName)) {
150:                        return true;
151:                    }
152:                }
153:
154:                return parameterInclude.isParameterLocked(parameterName);
155:            }
156:
157:            /**
158:             * Method setClassName.
159:             *
160:             * @param className the class name of the Handler class
161:             */
162:            public void setClassName(String className) {
163:                this .className = className;
164:            }
165:
166:            /**
167:             * Explicitly set the Handler object
168:             *
169:             * @param handler a Handler instance, which will be deployed wherever this HandlerDescription is
170:             */
171:            public void setHandler(Handler handler) {
172:                this .handler = handler;
173:                this .className = handler.getClass().getName();
174:            }
175:
176:            /**
177:             * Set the name
178:             *
179:             * @param name the desired name
180:             */
181:            public void setName(String name) {
182:                this .name = name;
183:            }
184:
185:            public void setParent(ParameterInclude parent) {
186:                this .parent = parent;
187:            }
188:
189:            /**
190:             * Set the deployment rules for this HandlerDescription
191:             *
192:             * @param rules a PhaseRule object
193:             */
194:            public void setRules(PhaseRule rules) {
195:                this.rules = rules;
196:            }
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.