Source Code Cross Referenced for ClientContainerDeploymentDesc.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_client » deployment » api » 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_client.deployment.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * JOnAS: Java(TM) Open Application Server
003:         * Copyright (C) 1999-2004 Bull S.A.
004:         * Contact: jonas-team@objectweb.org
005:         *
006:         * This library is free software; you can redistribute it and/or
007:         * modify it under the terms of the GNU Lesser General Public
008:         * License as published by the Free Software Foundation; either
009:         * version 2.1 of the License, or any later version.
010:         *
011:         * This library is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014:         * Lesser General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU Lesser General Public
017:         * License along with this library; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
019:         * USA
020:         *
021:         * Initial developer: Florent BENOIT
022:         * --------------------------------------------------------------------------
023:         * $Id: ClientContainerDeploymentDesc.java 4960 2004-06-16 15:57:47Z benoitf $
024:         * --------------------------------------------------------------------------
025:         */package org.objectweb.jonas_client.deployment.api;
026:
027:        // import java
028:        import org.objectweb.jonas_client.deployment.xml.ApplicationClient;
029:        import org.objectweb.jonas_client.deployment.xml.JonasClient;
030:        import org.objectweb.jonas_client.deployment.xml.JonasSecurity;
031:
032:        import org.objectweb.jonas_lib.deployment.api.DeploymentDescException;
033:        import org.objectweb.jonas_lib.deployment.api.EjbRefDesc;
034:        import org.objectweb.jonas_lib.deployment.api.EnvEntryDesc;
035:        import org.objectweb.jonas_lib.deployment.api.JndiEnvRefsGroupDesc;
036:        import org.objectweb.jonas_lib.deployment.api.MessageDestinationRefDesc;
037:        import org.objectweb.jonas_lib.deployment.api.ResourceEnvRefDesc;
038:        import org.objectweb.jonas_lib.deployment.api.ResourceRefDesc;
039:
040:        /**
041:         * This class do the parsing of the application-client.xml file and jonas-client.xml files and
042:         * contruct a data structure associated to these two files.
043:         * @author Florent Benoit
044:         * @author Philippe Coq
045:         */
046:        public class ClientContainerDeploymentDesc extends JndiEnvRefsGroupDesc {
047:
048:            /**
049:             * The name of the callback handler
050:             */
051:            private String callbackHandler = null;
052:
053:            /**
054:             * The name of the jaas config file
055:             */
056:            private String jaasFile = null;
057:
058:            /**
059:             * The name of the jaas entry
060:             */
061:            private String jaasEntry = null;
062:
063:            /**
064:             * The username to use for the callback handler
065:             */
066:            private String username = null;
067:
068:            /**
069:             * The password to use for the callback handler
070:             */
071:            private String password = null;
072:
073:            /**
074:             * Xml content of the standard deployement descriptor file
075:             */
076:            private String xmlContent = "";
077:
078:            /**
079:             * Xml content of the JOnAS deployement descriptor file
080:             */
081:            private String jonasXmlContent = "";
082:
083:            /**
084:             * Construct an instance of a ClientContainerDeploymentDesc.<BR>
085:             * Constructor is private, call one of the static getInstance
086:             * method instead.
087:             * @param classLoader the classloader for the classes.
088:             * @param applicationClient the data structure of the application-client (application-client.xml)
089:             * @param jonasClient the data structure of the jonas-client (jonas-client.xml)
090:             * @throws DeploymentDescException if the deployment
091:             * descriptors are corrupted.
092:             */
093:            public ClientContainerDeploymentDesc(ClassLoader classLoader,
094:                    ApplicationClient applicationClient, JonasClient jonasClient)
095:                    throws DeploymentDescException {
096:                super (classLoader, applicationClient, jonasClient, null);
097:
098:                // callbackHandler
099:                callbackHandler = null;
100:                if (applicationClient.getCallbackHandler() != null) {
101:                    callbackHandler = applicationClient.getCallbackHandler();
102:                }
103:
104:                JonasSecurity jonasSecurity = jonasClient.getJonasSecurity();
105:                if (jonasSecurity != null) {
106:                    // jaas config file
107:                    jaasFile = null;
108:                    if (jonasSecurity.getJaasfile() != null) {
109:                        jaasFile = jonasSecurity.getJaasfile();
110:                    }
111:
112:                    // jaas entry
113:                    jaasEntry = null;
114:                    if (jonasSecurity.getJaasentry() != null) {
115:                        jaasEntry = jonasSecurity.getJaasentry();
116:                    }
117:
118:                    // username
119:                    username = null;
120:                    if (jonasSecurity.getUsername() != null) {
121:                        username = jonasSecurity.getUsername();
122:                    }
123:
124:                    // password
125:                    password = null;
126:                    if (jonasSecurity.getPassword() != null) {
127:                        password = jonasSecurity.getPassword();
128:                    }
129:                }
130:
131:            }
132:
133:            /**
134:             * Get the name of the jaas configuration file
135:             * @return the name of the jaas configuration file
136:             */
137:            public String getJaasFile() {
138:                return jaasFile;
139:            }
140:
141:            /**
142:             * Get the entry in the jaas configuration file
143:             * @return the entry in the jaas configuration file
144:             */
145:            public String getJaasEntry() {
146:                return jaasEntry;
147:            }
148:
149:            /**
150:             * Get the username used for a callback handler
151:             * @return the username used for a callback handler
152:             */
153:            public String getUsername() {
154:                return username;
155:            }
156:
157:            /**
158:             * Get the password used for a callback handler
159:             * @return the password used for a callback handler
160:             */
161:            public String getPassword() {
162:                return password;
163:            }
164:
165:            /**
166:             * Get the callback handler of this client application.
167:             * @return the callback handler of this client application.
168:             */
169:            public String getCallbackHandler() {
170:                return callbackHandler;
171:            }
172:
173:            /**
174:             * Return the content of the web.xml file
175:             * @return the content of the web.xml file
176:             */
177:            public String getXmlContent() {
178:                return xmlContent;
179:            }
180:
181:            /**
182:             * Return the content of the jonas-web.xml file
183:             * @return the content of the jonas-web.xml file
184:             */
185:            public String getJOnASXmlContent() {
186:                return jonasXmlContent;
187:            }
188:
189:            /**
190:             * @param xmlContent XML Content
191:             */
192:            public void setXmlContent(String xmlContent) {
193:                this .xmlContent = xmlContent;
194:            }
195:
196:            /**
197:             * @param jonasXmlContent XML Content
198:             */
199:            public void setJOnASXmlContent(String jonasXmlContent) {
200:                this .jonasXmlContent = jonasXmlContent;
201:            }
202:
203:            /**
204:             * Return a String representation of the ClientContainerDeploymentDesc.
205:             * @return a String representation of the ClientContainerDeploymentDesc.
206:             */
207:            public String toString() {
208:                StringBuffer ret = new StringBuffer();
209:
210:                // Return the displayName
211:                ret.append("\ngetDisplayName()=" + getDisplayName());
212:
213:                // Return the resource-env-ref
214:                ResourceEnvRefDesc[] rer = getResourceEnvRefDesc();
215:                for (int i = 0; i < rer.length; i++) {
216:                    ret.append("\ngetResourceEnvRefDesc(" + i + ")="
217:                            + rer[i].getClass().getName());
218:                    ret.append(rer[i].toString());
219:                }
220:
221:                // Return the resource-ref
222:                ResourceRefDesc[] resourceRefDesc = getResourceRefDesc();
223:                for (int i = 0; i < resourceRefDesc.length; i++) {
224:                    ret.append("\ngetResourceRefDesc(" + i + ")="
225:                            + resourceRefDesc[i].getClass().getName());
226:                    ret.append(resourceRefDesc[i].toString());
227:                }
228:
229:                // Return the env-entry
230:                EnvEntryDesc[] envEntries = getEnvEntryDesc();
231:                for (int i = 0; i < envEntries.length; i++) {
232:                    ret.append("\ngetEnvEntryDesc(" + i + ")="
233:                            + envEntries[i].getClass().getName());
234:                    ret.append(envEntries[i].toString());
235:                }
236:
237:                // Return the ejb-ref
238:                EjbRefDesc[] ejbRefDesc = getEjbRefDesc();
239:                for (int i = 0; i < ejbRefDesc.length; i++) {
240:                    ret.append("\ngetEjbRefDesc(" + i + ")="
241:                            + ejbRefDesc[i].getClass().getName());
242:                    ret.append(ejbRefDesc[i].toString());
243:                }
244:
245:                // Return the message-destination-ref
246:                MessageDestinationRefDesc[] mdRefDesc = getMessageDestinationRefDesc();
247:                for (int i = 0; i < mdRefDesc.length; i++) {
248:                    ret.append("\ngetMessageDestinationRefDesc(" + i + ")="
249:                            + mdRefDesc[i].getClass().getName());
250:                    ret.append(mdRefDesc[i].toString());
251:                }
252:
253:                // Return the callbackHandler
254:                ret.append("\ngetCallbackHandler()=" + getCallbackHandler());
255:
256:                return ret.toString();
257:            }
258:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.