Source Code Cross Referenced for RemoteJBIAdminCommandsFactory.java in  » ESB » open-esb » com » sun » jbi » ui » client » 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 » ESB » open esb » com.sun.jbi.ui.client 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * BEGIN_HEADER - DO NOT EDIT
003:         *
004:         * The contents of this file are subject to the terms
005:         * of the Common Development and Distribution License
006:         * (the "License").  You may not use this file except
007:         * in compliance with the License.
008:         *
009:         * You can obtain a copy of the license at
010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011:         * See the License for the specific language governing
012:         * permissions and limitations under the License.
013:         *
014:         * When distributing Covered Code, include this CDDL
015:         * HEADER in each file and include the License file at
016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017:         * If applicable add the following below this CDDL HEADER,
018:         * with the fields enclosed by brackets "[]" replaced with
019:         * your own identifying information: Portions Copyright
020:         * [year] [name of copyright owner]
021:         */
022:
023:        /*
024:         * @(#)RemoteJBIAdminCommandsFactory.java
025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026:         *
027:         * END_HEADER - DO NOT EDIT
028:         */
029:        package com.sun.jbi.ui.client;
030:
031:        import com.sun.jbi.ui.common.JBIRemoteException;
032:        import com.sun.jbi.ui.common.JBIResultXmlBuilder;
033:        import com.sun.jbi.ui.common.JMXConnectionException;
034:        import java.util.Properties;
035:
036:        /** This class is a factory class to create the RemoteJBIAdminCommands implemenation.
037:         *
038:         * @author Sun Microsystems, Inc.
039:         */
040:
041:        public abstract class RemoteJBIAdminCommandsFactory {
042:            /** property name for class to load */
043:            public static final String FACTORY_IMPL_CLASS_PROP = "com.sun.jbi.ui.client.RemoteJBIAdminCommandsFactory";
044:            /** if no property set, try load this impl class  */
045:            public static final String FACTORY_IMPL_CLASS = "com.sun.jbi.internal.ui.client.RemoteJBIAdminCommandsFactoryImpl";
046:
047:            /**
048:             * constructor
049:             */
050:            protected RemoteJBIAdminCommandsFactory() {
051:                // check system properties and initailize the builders.
052:            }
053:
054:            /**
055:             * Creates a Factory class depending on the system settings. The order it looks for
056:             * creating the factory implementation is look for the system property
057:             * com.sun.jbi.ui.ant.client.RemoteJBIAdminCommandsFactory for the class name to
058:             * load and then to the standard com.sun.jbi.internal.ui.client.RemoteJBIAdminCommandsFactoryImpl
059:             * or a default implementation com.sun.jbi.ui.ant.client.RemoteJBIAdminCommandsFactory.Impl
060:             *
061:             * @return The instance of the JBIAdminCommandsFactory
062:             */
063:            public static RemoteJBIAdminCommandsFactory newInstance() {
064:                String factoryImplClass = System.getProperty(
065:                        FACTORY_IMPL_CLASS_PROP, FACTORY_IMPL_CLASS);
066:
067:                RemoteJBIAdminCommandsFactory impl = null;
068:                try {
069:                    impl = (RemoteJBIAdminCommandsFactory) Class.forName(
070:                            factoryImplClass).newInstance();
071:                } catch (Exception ex) {
072:                    // any exception, just load the default class
073:                    impl = new DefaultFactoryImpl();
074:                }
075:                return impl;
076:            }
077:
078:            /** get jbi client interface
079:             * @param connProps Connection Properties
080:             * @throws JMXConnectionException on error
081:             * @return result
082:             */
083:            public abstract RemoteJBIAdminCommands createRemoteJBIAdminCommands(
084:                    Properties connProps) throws JMXConnectionException;
085:
086:            /**
087:             * This class is a default factory implementation.
088:             */
089:            private static class DefaultFactoryImpl extends
090:                    RemoteJBIAdminCommandsFactory {
091:                /**
092:                 * constructor.
093:                 */
094:                public DefaultFactoryImpl() {
095:                    super ();
096:                }
097:
098:                /** get jbi client interface
099:                 * @param connProps Connection Properties
100:                 * @throws JMXConnectionException on error
101:                 * @return result
102:                 */
103:                public RemoteJBIAdminCommands createRemoteJBIAdminCommands(
104:                        Properties connProps) throws JMXConnectionException {
105:                    return new DefaultRemoteJBIAdminCommandsImpl(connProps);
106:                }
107:
108:                /**
109:                 * string value of the object
110:                 * @return string value of the object
111:                 */
112:                public String toString() {
113:                    return "Default RemoteJBIAdminCommandsFactory Implementation";
114:                }
115:            }
116:
117:            /**
118:             * Default implementation of the RemoteJBIAdminCommands
119:             */
120:            public static class DefaultRemoteJBIAdminCommandsImpl extends
121:                    AbstractJMXClient implements  RemoteJBIAdminCommands {
122:                /** host for jmx connection */
123:                private String mHost = null;
124:
125:                /**
126:                 * constructor
127:                 * @param connProps Properties object
128:                 */
129:                public DefaultRemoteJBIAdminCommandsImpl(Properties connProps) {
130:                    super ();
131:                    this .mHost = connProps
132:                            .getProperty(JMXConnectionProperties.HOST_PROP);
133:
134:                }
135:
136:                /**
137:                 * remotely deploys service assembly by uploading the file to server side.
138:                 * Not supported in RI. Using this interface throws unsupported exception in RI.
139:                 * @return result as a management message xml text
140:                 * @param zipFilePath fie path
141:                 * @throws JBIRemoteException on error
142:                 */
143:                public String remoteDeployServiceAssembly(String zipFilePath)
144:                        throws JBIRemoteException {
145:                    String msg = JBIResultXmlBuilder.createFailedJbiResultXml(
146:                            getI18NBundle(),
147:                            "jbi.ui.client.remote.deploy.not.supported",
148:                            new Object[] { this .mHost });
149:                    throw new JBIRemoteException(
150:                            new UnsupportedOperationException(msg));
151:                }
152:
153:                /**
154:                 * remotely install service engine or binding component by uploading the file server side
155:                 * Not supported in RI. Using this interface throws unsupported exception in RI.
156:                 * @return result as a management message xml text
157:                 * @param paramProps Properties object contains name,value pair for parameters.
158:                 * @param zipFilePath fie path
159:                 * @throws JBIRemoteException on error
160:                 */
161:                public String remoteInstallComponent(String zipFilePath,
162:                        Properties params) throws JBIRemoteException {
163:                    String msg = null;
164:                    if (params != null && params.size() > 0) {
165:                        msg = JBIResultXmlBuilder
166:                                .createFailedJbiResultXml(
167:                                        getI18NBundle(),
168:                                        "jbi.ui.client.remote.install.component.with.params.not.supported",
169:                                        new Object[] { this .mHost });
170:
171:                    } else {
172:                        msg = JBIResultXmlBuilder
173:                                .createFailedJbiResultXml(
174:                                        getI18NBundle(),
175:                                        "jbi.ui.client.remote.install.component.not.supported",
176:                                        new Object[] { this .mHost });
177:                    }
178:
179:                    throw new JBIRemoteException(
180:                            new UnsupportedOperationException(msg));
181:                }
182:
183:                /**
184:                 * remotely install service engine or binding component by uploading the file server side
185:                 * Not supported in RI. Using this interface throws unsupported exception in RI.
186:                 * @return result as a management message xml text
187:                 * @param zipFilePath fie path
188:                 * @throws JBIRemoteException on error
189:                 */
190:                public String remoteInstallComponent(String zipFilePath)
191:                        throws JBIRemoteException {
192:                    String msg = JBIResultXmlBuilder
193:                            .createFailedJbiResultXml(
194:                                    getI18NBundle(),
195:                                    "jbi.ui.client.remote.install.component.not.supported",
196:                                    new Object[] { this .mHost });
197:
198:                    throw new JBIRemoteException(
199:                            new UnsupportedOperationException(msg));
200:                }
201:
202:                /**
203:                 * remotely install shared library by uploading the file to server side
204:                 * Not supported in RI. Using this interface throws unsupported exception in RI.
205:                 * @return result as a management message xml text
206:                 * @param zipFilePath fie path
207:                 * @throws JBIRemoteException on error
208:                 */
209:                public String remoteInstallSharedLibrary(String zipFilePath)
210:                        throws JBIRemoteException {
211:                    String msg = JBIResultXmlBuilder.createFailedJbiResultXml(
212:                            getI18NBundle(),
213:                            "jbi.ui.client.remote.install.slib.not.supported",
214:                            new Object[] { this .mHost });
215:
216:                    throw new JBIRemoteException(
217:                            new UnsupportedOperationException(msg));
218:                }
219:
220:            }
221:
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.