Source Code Cross Referenced for WebManager.java in  » EJB-Server-geronimo » management » org » apache » geronimo » management » geronimo » 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 » EJB Server geronimo » management » org.apache.geronimo.management.geronimo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         *  Unless required by applicable law or agreed to in writing, software
012:         *  distributed under the License is distributed on an "AS IS" BASIS,
013:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         *  See the License for the specific language governing permissions and
015:         *  limitations under the License.
016:         */package org.apache.geronimo.management.geronimo;
017:
018:        import java.util.List;
019:        import java.util.ArrayList;
020:        import java.beans.PropertyEditor;
021:
022:        import org.apache.geronimo.gbean.AbstractName;
023:        import org.apache.geronimo.common.propertyeditor.PropertyEditors;
024:
025:        /**
026:         * Specialization of NetworkManager for web containers.
027:         *
028:         * @version $Rev: 562293 $ $Date: 2007-08-02 16:54:48 -0700 (Thu, 02 Aug 2007) $
029:         */
030:        public interface WebManager extends NetworkManager {
031:            public final static String PROTOCOL_HTTP = "HTTP";
032:            public final static String PROTOCOL_HTTPS = "HTTPS";
033:            public final static String PROTOCOL_AJP = "AJP";
034:
035:            /**
036:             * Gets the WebAccessLog implementation for a web container.
037:             * May be null if the access log cannot be managed.
038:             *
039:             * @param container The container whose access log is interesting
040:             *
041:             */
042:            public WebAccessLog getAccessLog(WebContainer container);
043:
044:            List<ConnectorType> getConnectorTypes();
045:
046:            List<ConnectorAttribute> getConnectorAttributes(
047:                    ConnectorType connectorType);
048:
049:            AbstractName getConnectorConfiguration(ConnectorType connectorType,
050:                    List<ConnectorAttribute> connectorAttributes,
051:                    WebContainer container, String uniqueName);
052:
053:            ConnectorType getConnectorType(AbstractName connectorName);
054:
055:            public class ConnectorType {
056:                private final String description;
057:
058:                public ConnectorType(String description) {
059:                    this .description = description;
060:                }
061:
062:                public String getDescription() {
063:                    return description;
064:                }
065:
066:                @Override
067:                public int hashCode() {
068:                    final int PRIME = 31;
069:                    int result = 1;
070:                    result = PRIME
071:                            * result
072:                            + ((description == null) ? 0 : description
073:                                    .hashCode());
074:                    return result;
075:                }
076:
077:                @Override
078:                public boolean equals(Object obj) {
079:                    if (this  == obj)
080:                        return true;
081:                    if (obj == null)
082:                        return false;
083:                    if (getClass() != obj.getClass())
084:                        return false;
085:                    final ConnectorType other = (ConnectorType) obj;
086:                    if (description == null) {
087:                        if (other.description != null)
088:                            return false;
089:                    } else if (!description.equals(other.description))
090:                        return false;
091:                    return true;
092:                }
093:            }
094:
095:            public class ConnectorAttribute<T> {
096:                private final String attributeName;
097:                private String stringValue;
098:                private final Class<T> clazz;
099:                private T value;
100:                private final String description;
101:                private boolean required;
102:
103:                public ConnectorAttribute(String attributeName, T value,
104:                        String description, Class<T> clazz, boolean required) {
105:                    this .attributeName = attributeName;
106:                    this .value = value;
107:                    this .description = description;
108:                    this .clazz = clazz;
109:                    this .required = required;
110:                }
111:
112:                public ConnectorAttribute(String attributeName, T value,
113:                        String description, Class<T> clazz) {
114:                    this (attributeName, value, description, clazz, false);
115:                }
116:
117:                public ConnectorAttribute(
118:                        ConnectorAttribute<T> connectorAttribute) {
119:                    this .attributeName = connectorAttribute.attributeName;
120:                    this .value = connectorAttribute.value;
121:                    this .description = connectorAttribute.description;
122:                    this .clazz = connectorAttribute.clazz;
123:                    this .required = connectorAttribute.required;
124:                }
125:
126:                public String getAttributeName() {
127:                    return attributeName;
128:                }
129:
130:                public String getStringValue() {
131:                    //            Class<T> clazz = getClass().getTypeParameters();
132:                    if (value == null)
133:                        return null;
134:                    PropertyEditor propertyEditor = PropertyEditors
135:                            .getEditor(clazz);
136:                    propertyEditor.setValue(value);
137:                    return propertyEditor.getAsText();
138:                }
139:
140:                public void setStringValue(String stringValue) {
141:                    PropertyEditor propertyEditor = PropertyEditors
142:                            .getEditor(clazz);
143:                    propertyEditor.setAsText(stringValue);
144:                    this .value = (T) propertyEditor.getValue();
145:                }
146:
147:                public T getValue() {
148:                    return value;
149:                }
150:
151:                public void setValue(T value) {
152:                    this .value = value;
153:                }
154:
155:                public String getDescription() {
156:                    return description;
157:                }
158:
159:                public static List<ConnectorAttribute> copy(
160:                        List<ConnectorAttribute> source) {
161:                    List<ConnectorAttribute> copy = new ArrayList<ConnectorAttribute>(
162:                            source.size());
163:                    for (ConnectorAttribute connectorAttribute : source) {
164:                        copy.add(new ConnectorAttribute(connectorAttribute));
165:                    }
166:                    return copy;
167:                }
168:
169:                public Class<T> getAttributeClass() {
170:                    return clazz;
171:                }
172:
173:                public boolean isRequired() {
174:                    return required;
175:                }
176:
177:                public void setRequired(boolean required) {
178:                    this.required = required;
179:                }
180:
181:            }
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.