Source Code Cross Referenced for ServiceEnumeration.java in  » Testing » jakarta-cactus » org » apache » cactus » internal » 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 » Testing » jakarta cactus » org.apache.cactus.internal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * ========================================================================
003:         * 
004:         * Copyright 2001-2004 The Apache Software Foundation.
005:         *
006:         * Licensed under the Apache License, Version 2.0 (the "License");
007:         * you may not use this file except in compliance with the License.
008:         * 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, software
013:         * distributed under the License is distributed on an "AS IS" BASIS,
014:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         * See the License for the specific language governing permissions and
016:         * limitations under the License.
017:         * 
018:         * ========================================================================
019:         */
020:        package org.apache.cactus.internal;
021:
022:        /**
023:         * List of valid services that the test redirectors can perform.
024:         * 
025:         * @version $Id: ServiceEnumeration.java 238991 2004-05-22 11:34:50Z vmassol $
026:         */
027:        public final class ServiceEnumeration {
028:            /**
029:             * Call test method Service.
030:             */
031:            public static final ServiceEnumeration CALL_TEST_SERVICE = new ServiceEnumeration(
032:                    "CALL_TEST");
033:
034:            /**
035:             * Get the previous test results Service.
036:             */
037:            public static final ServiceEnumeration GET_RESULTS_SERVICE = new ServiceEnumeration(
038:                    "GET_RESULTS");
039:
040:            /**
041:             * Noop service for testing.
042:             */
043:            public static final ServiceEnumeration RUN_TEST_SERVICE = new ServiceEnumeration(
044:                    "RUN_TEST");
045:
046:            /**
047:             * Service used to create an HTTP session so that it is returned
048:             * in a cookie.
049:             * @since 1.5
050:             */
051:            public static final ServiceEnumeration CREATE_SESSION_SERVICE = new ServiceEnumeration(
052:                    "CREATE_SESSION");
053:
054:            /**
055:             * Service that returns a cactus version identifier. This is used
056:             * to verify that the server side and client side versions of 
057:             * Cactus are the same.
058:             * @since 1.5
059:             */
060:            public static final ServiceEnumeration GET_VERSION_SERVICE = new ServiceEnumeration(
061:                    "GET_VERSION");
062:
063:            /**
064:             * The service's name
065:             */
066:            private String name;
067:
068:            /**
069:             * Private constructor to only allow the predefined instances of the
070:             * enumeration.
071:             *
072:             * @param theServiceName the name of the service
073:             */
074:            private ServiceEnumeration(String theServiceName) {
075:                this .name = theServiceName;
076:            }
077:
078:            /**
079:             * Compares a string representing the name of the service with the service
080:             * enumerated type.
081:             *
082:             * @param theString the string to compare with this Service name
083:             * @return true if the string corresponds to the current Service
084:             * @deprecated Use {@link ServiceEnumeration#valueOf} and identity
085:             *              comparison instead of this method
086:             */
087:            public boolean equals(String theString) {
088:                return theString.equals(this .name);
089:            }
090:
091:            /**
092:             * Always compares object identity.
093:             * 
094:             * @see java.lang.Object#equals(Object)
095:             * @since 1.5
096:             */
097:            public boolean equals(Object theObject) {
098:                return super .equals(theObject);
099:            }
100:
101:            /**
102:             * Delegates to the <code>java.lang.Object</code> implementation.
103:             * 
104:             * @see java.lang.Object#equals(Object)
105:             * @since 1.5
106:             */
107:            public int hashCode() {
108:                return super .hashCode();
109:            }
110:
111:            /**
112:             * Returns the string representation of the service.
113:             * 
114:             * @return the service's name
115:             * @see java.lang.Object#toString
116:             */
117:            public String toString() {
118:                return this .name;
119:            }
120:
121:            /**
122:             * Returns the enumeration instance corresponding to the provided service 
123:             * name.
124:             * 
125:             * @param theName The name of the service
126:             * @return The corresponding service instance
127:             * @since 1.5
128:             */
129:            public static ServiceEnumeration valueOf(String theName) {
130:                if (CALL_TEST_SERVICE.name.equals(theName)) {
131:                    return CALL_TEST_SERVICE;
132:                } else if (GET_RESULTS_SERVICE.name.equals(theName)) {
133:                    return GET_RESULTS_SERVICE;
134:                } else if (RUN_TEST_SERVICE.name.equals(theName)) {
135:                    return RUN_TEST_SERVICE;
136:                } else if (CREATE_SESSION_SERVICE.name.equals(theName)) {
137:                    return CREATE_SESSION_SERVICE;
138:                } else if (GET_VERSION_SERVICE.name.equals(theName)) {
139:                    return GET_VERSION_SERVICE;
140:                }
141:                return null;
142:            }
143:
144:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.