Source Code Cross Referenced for RuntimeManagementServiceImpl.java in  » ESB » open-esb » com » sun » esb » management » impl » runtime » 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.esb.management.impl.runtime 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * BEGIN_HEADER - DO NOT EDIT
0003:         *
0004:         * The contents of this file are subject to the terms
0005:         * of the Common Development and Distribution License
0006:         * (the "License").  You may not use this file except
0007:         * in compliance with the License.
0008:         *
0009:         * You can obtain a copy of the license at
0010:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
0011:         * See the License for the specific language governing
0012:         * permissions and limitations under the License.
0013:         *
0014:         * When distributing Covered Code, include this CDDL
0015:         * HEADER in each file and include the License file at
0016:         * https://open-esb.dev.java.net/public/CDDLv1.0.html.
0017:         * If applicable add the following below this CDDL HEADER,
0018:         * with the fields enclosed by brackets "[]" replaced with
0019:         * your own identifying information: Portions Copyright
0020:         * [year] [name of copyright owner]
0021:         */
0022:
0023:        /*
0024:         * @(#)RuntimeManagementServiceImpl.java
0025:         * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
0026:         *
0027:         * END_HEADER - DO NOT EDIT
0028:         */
0029:        package com.sun.esb.management.impl.runtime;
0030:
0031:        import java.io.Serializable;
0032:        import java.util.Map;
0033:
0034:        import javax.management.MBeanServerConnection;
0035:        import javax.management.ObjectName;
0036:
0037:        import com.sun.esb.management.api.runtime.RuntimeManagementService;
0038:        import com.sun.esb.management.base.services.AbstractServiceImpl;
0039:        import com.sun.esb.management.common.ManagementRemoteException;
0040:
0041:        /**
0042:         * Defines client operations for common runtime management services for the
0043:         * clients. Common runtime management operations include listing component
0044:         * containers available in the runtime, composite applications deployed,
0045:         * controlling lifecycle across the runtime and composite applications, getting
0046:         * state of each container and composite application, etc.
0047:         * 
0048:         * @author graj
0049:         */
0050:        public class RuntimeManagementServiceImpl extends AbstractServiceImpl
0051:                implements  Serializable, RuntimeManagementService {
0052:
0053:            static final long serialVersionUID = -1L;
0054:
0055:            /**
0056:             * Constructor - Constructs a new instance of
0057:             * RuntimeManagementServiceImpl
0058:             */
0059:            public RuntimeManagementServiceImpl() {
0060:                super (null, false);
0061:            }
0062:
0063:            /**
0064:             * Constructor - Constructs a new instance of
0065:             * RuntimeManagementServiceImpl
0066:             * 
0067:             * @param serverConnection
0068:             */
0069:            public RuntimeManagementServiceImpl(
0070:                    MBeanServerConnection serverConnection) {
0071:                super (serverConnection, false);
0072:            }
0073:
0074:            /**
0075:             * Constructor - Constructs a new instance of
0076:             * RuntimeManagementServiceImpl
0077:             * 
0078:             * @param serverConnection
0079:             * @param isRemoteConnection
0080:             */
0081:            public RuntimeManagementServiceImpl(
0082:                    MBeanServerConnection serverConnection,
0083:                    boolean isRemoteConnection) {
0084:                super (serverConnection, isRemoteConnection);
0085:            }
0086:
0087:            /**
0088:             * return component info xml text that has only binding component infos.
0089:             * 
0090:             * @return the component info xml text.
0091:             * @param targetName
0092:             * @throws ManagementRemoteException
0093:             *             on error
0094:             * 
0095:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listBindingComponents(java.lang.String)
0096:             */
0097:            public String listBindingComponents(String targetName)
0098:                    throws ManagementRemoteException {
0099:                return listBindingComponents(null, null, null, targetName);
0100:            }
0101:
0102:            /**
0103:             * return component info xml text that has only binding component infos
0104:             * which satisfies the options passed to the method.
0105:             * 
0106:             * @param state
0107:             *            return all the binding components that are in the specified
0108:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0109:             *            INSTALLED or null for ANY state
0110:             * @param sharedLibraryName
0111:             *            return all the binding components that have a dependency on
0112:             *            the specified shared library. null value to ignore this
0113:             *            option.
0114:             * @param serviceAssemblyName
0115:             *            return all the binding components that have the specified
0116:             *            service assembly deployed on them. null value to ignore this
0117:             *            option.
0118:             * @param targetName
0119:             * @return xml text contain the list of binding component infos
0120:             * @throws ManagementRemoteException
0121:             *             if error or exception occurs.
0122:             * 
0123:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listBindingComponents(java.lang.String,
0124:             *      java.lang.String, java.lang.String, java.lang.String)
0125:             */
0126:            public String listBindingComponents(String state,
0127:                    String sharedLibraryName, String serviceAssemblyName,
0128:                    String targetName) throws ManagementRemoteException {
0129:                ObjectName mbeanName = this 
0130:                        .getRuntimeManagementServiceMBeanObjectName();
0131:                Object resultObject = null;
0132:
0133:                Object[] params = new Object[4];
0134:                params[0] = state;
0135:                params[1] = sharedLibraryName;
0136:                params[2] = serviceAssemblyName;
0137:                params[3] = targetName;
0138:
0139:                String[] signature = new String[4];
0140:                signature[0] = "java.lang.String";
0141:                signature[1] = "java.lang.String";
0142:                signature[2] = "java.lang.String";
0143:                signature[3] = "java.lang.String";
0144:
0145:                resultObject = this .invokeMBeanOperation(mbeanName,
0146:                        "listBindingComponents", params, signature);
0147:
0148:                return resultObject.toString();
0149:            }
0150:
0151:            /**
0152:             * return component info xml text that has only binding component infos.
0153:             * 
0154:             * @return the component info xml text.
0155:             * @param targetNames
0156:             * @throws ManagementRemoteException
0157:             *             on error
0158:             * 
0159:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listBindingComponents(java.lang.String[])
0160:             */
0161:            public Map<String, String> listBindingComponents(
0162:                    String[] targetNames) throws ManagementRemoteException {
0163:                return this 
0164:                        .listBindingComponents(null, null, null, targetNames);
0165:            }
0166:
0167:            /**
0168:             * return component info xml text that has only binding component infos
0169:             * which satisfies the options passed to the method.
0170:             * 
0171:             * @param state
0172:             *            return all the binding components that are in the specified
0173:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0174:             *            INSTALLED or null for ANY state
0175:             * @param sharedLibraryName
0176:             *            return all the binding components that have a dependency on
0177:             *            the specified shared library. null value to ignore this
0178:             *            option.
0179:             * @param serviceAssemblyName
0180:             *            return all the binding components that have the specified
0181:             *            service assembly deployed on them. null value to ignore this
0182:             *            option.
0183:             * @param targetNames
0184:             * @return xml text contain the list of binding component infos
0185:             * @throws ManagementRemoteException
0186:             *             if error or exception occurs.
0187:             * 
0188:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listBindingComponents(java.lang.String,
0189:             *      java.lang.String, java.lang.String, java.lang.String[])
0190:             */
0191:            @SuppressWarnings("unchecked")
0192:            public Map<String, String> listBindingComponents(String state,
0193:                    String sharedLibraryName, String serviceAssemblyName,
0194:                    String[] targetNames) throws ManagementRemoteException {
0195:                ObjectName mbeanName = this 
0196:                        .getRuntimeManagementServiceMBeanObjectName();
0197:
0198:                Map<String, String> resultObject = null;
0199:
0200:                Object[] params = new Object[4];
0201:                params[0] = state;
0202:                params[1] = sharedLibraryName;
0203:                params[2] = serviceAssemblyName;
0204:                params[3] = targetNames;
0205:
0206:                String[] signature = new String[4];
0207:                signature[0] = "java.lang.String";
0208:                signature[1] = "java.lang.String";
0209:                signature[2] = "java.lang.String";
0210:                signature[3] = targetNames.getClass().getName();
0211:
0212:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0213:                        mbeanName, "listBindingComponents", params, signature);
0214:
0215:                return resultObject;
0216:            }
0217:
0218:            /**
0219:             * returns a list of Service Assembly Infos in a xml format.
0220:             * 
0221:             * @param targetName
0222:             * @return xml text containing the Service Assembly infos
0223:             * @throws ManagementRemoteException
0224:             *             on error
0225:             * 
0226:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String)
0227:             */
0228:            public String listServiceAssemblies(String targetName)
0229:                    throws ManagementRemoteException {
0230:                return listServiceAssemblies(null, null, targetName);
0231:            }
0232:
0233:            /**
0234:             * returns the list of service asssembly infos in a xml format that have the
0235:             * service unit deployed on the specified component.
0236:             * 
0237:             * @param componentName
0238:             *            to list all the service assemblies that have some deployments
0239:             *            on this component.
0240:             * @param targetName
0241:             * @return xml string contain the list of service assembly infos
0242:             * @throws ManagementRemoteException
0243:             *             if error or exception occurs.
0244:             * 
0245:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String,
0246:             *      java.lang.String)
0247:             */
0248:            public String listServiceAssemblies(String componentName,
0249:                    String targetName) throws ManagementRemoteException {
0250:                return listServiceAssemblies(null, componentName, targetName);
0251:            }
0252:
0253:            /**
0254:             * returns the list of service asssembly infos in a xml format that have the
0255:             * service unit deployed on the specified component.
0256:             * 
0257:             * @param state
0258:             *            to return all the service assemblies that are in the specified
0259:             *            state. JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or
0260:             *            null for ANY state
0261:             * @param componentName
0262:             *            to list all the service assemblies that have some deployments
0263:             *            on this component.
0264:             * @param targetName
0265:             * @return xml string contain the list of service assembly infos
0266:             * @throws ManagementRemoteException
0267:             *             if error or exception occurs.
0268:             * 
0269:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String,
0270:             *      java.lang.String, java.lang.String)
0271:             */
0272:            public String listServiceAssemblies(String state,
0273:                    String componentName, String targetName)
0274:                    throws ManagementRemoteException {
0275:                ObjectName mbeanName = this 
0276:                        .getRuntimeManagementServiceMBeanObjectName();
0277:                Object resultObject = null;
0278:
0279:                Object[] params = new Object[3];
0280:                params[0] = state;
0281:                params[1] = componentName;
0282:                params[2] = targetName;
0283:
0284:                String[] signature = new String[3];
0285:                signature[0] = "java.lang.String";
0286:                signature[1] = "java.lang.String";
0287:                signature[2] = "java.lang.String";
0288:
0289:                resultObject = this .invokeMBeanOperation(mbeanName,
0290:                        "listServiceAssemblies", params, signature);
0291:
0292:                return resultObject.toString();
0293:            }
0294:
0295:            /**
0296:             * returns a list of Service Assembly Infos in a xml format.
0297:             * 
0298:             * @param targetNames
0299:             * @return xml text containing the Service Assembly infos
0300:             * @throws ManagementRemoteException
0301:             *             on error
0302:             * 
0303:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String[])
0304:             */
0305:            public Map<String, String> listServiceAssemblies(
0306:                    String[] targetNames) throws ManagementRemoteException {
0307:                return listServiceAssemblies(null, null, targetNames);
0308:            }
0309:
0310:            /**
0311:             * returns the list of service asssembly infos in a xml format that have the
0312:             * service unit deployed on the specified component.
0313:             * 
0314:             * @param componentName
0315:             *            to list all the service assemblies that have some deployments
0316:             *            on this component.
0317:             * @param targetNames
0318:             * @return xml string contain the list of service assembly infos
0319:             * @throws ManagementRemoteException
0320:             *             if error or exception occurs.
0321:             * 
0322:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String,
0323:             *      java.lang.String[])
0324:             */
0325:            public Map<String, String> listServiceAssemblies(
0326:                    String componentName, String[] targetNames)
0327:                    throws ManagementRemoteException {
0328:                return listServiceAssemblies(null, componentName, targetNames);
0329:            }
0330:
0331:            /**
0332:             * returns the list of service asssembly infos in a xml format that have the
0333:             * service unit deployed on the specified component.
0334:             * 
0335:             * @param state
0336:             *            to return all the service assemblies that are in the specified
0337:             *            state. JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or
0338:             *            null for ANY state
0339:             * @param componentName
0340:             *            to list all the service assemblies that have some deployments
0341:             *            on this component.
0342:             * @param targetNames
0343:             * @return xml string contain the list of service assembly infos
0344:             * @throws ManagementRemoteException
0345:             *             if error or exception occurs.
0346:             * 
0347:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceAssemblies(java.lang.String,
0348:             *      java.lang.String, java.lang.String[])
0349:             */
0350:            @SuppressWarnings("unchecked")
0351:            public Map<String, String> listServiceAssemblies(String state,
0352:                    String componentName, String[] targetNames)
0353:                    throws ManagementRemoteException {
0354:                ObjectName mbeanName = this 
0355:                        .getRuntimeManagementServiceMBeanObjectName();
0356:                Map<String, String> resultObject = null;
0357:
0358:                Object[] params = new Object[3];
0359:                params[0] = state;
0360:                params[1] = componentName;
0361:                params[2] = targetNames;
0362:
0363:                String[] signature = new String[3];
0364:                signature[0] = "java.lang.String";
0365:                signature[1] = "java.lang.String";
0366:                signature[2] = targetNames.getClass().getName();
0367:
0368:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0369:                        mbeanName, "listServiceAssemblies", params, signature);
0370:
0371:                return resultObject;
0372:            }
0373:
0374:            /**
0375:             * return component info xml text that has only service engine infos.
0376:             * 
0377:             * @param targetName
0378:             * @return the component info xml text.
0379:             * @throws ManagementRemoteException
0380:             *             on error
0381:             * 
0382:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceEngines(java.lang.String)
0383:             */
0384:            public String listServiceEngines(String targetName)
0385:                    throws ManagementRemoteException {
0386:                return this .listServiceEngines(null, null, null, targetName);
0387:            }
0388:
0389:            /**
0390:             * return component info xml text that has only service engine infos which
0391:             * satisfies the options passed to the method.
0392:             * 
0393:             * @param state
0394:             *            return all the service engines that are in the specified
0395:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0396:             *            INSTALLED or null for ANY state
0397:             * @param sharedLibraryName
0398:             *            return all the service engines that have a dependency on the
0399:             *            specified shared library. null value to ignore this option.
0400:             * @param serviceAssemblyName
0401:             *            return all the service engines that have the specified service
0402:             *            assembly deployed on them. null value to ignore this option.
0403:             * @param targetName
0404:             * @return xml text contain the list of service engine component infos
0405:             * @throws ManagementRemoteException
0406:             *             if error or exception occurs.
0407:             * 
0408:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceEngines(java.lang.String,
0409:             *      java.lang.String, java.lang.String, java.lang.String)
0410:             */
0411:            public String listServiceEngines(String state,
0412:                    String sharedLibraryName, String serviceAssemblyName,
0413:                    String targetName) throws ManagementRemoteException {
0414:                ObjectName mbeanName = this 
0415:                        .getRuntimeManagementServiceMBeanObjectName();
0416:                Object resultObject = null;
0417:
0418:                Object[] params = new Object[4];
0419:                params[0] = state;
0420:                params[1] = sharedLibraryName;
0421:                params[2] = serviceAssemblyName;
0422:                params[3] = targetName;
0423:
0424:                String[] signature = new String[4];
0425:                signature[0] = "java.lang.String";
0426:                signature[1] = "java.lang.String";
0427:                signature[2] = "java.lang.String";
0428:                signature[3] = "java.lang.String";
0429:
0430:                resultObject = this .invokeMBeanOperation(mbeanName,
0431:                        "listServiceEngines", params, signature);
0432:
0433:                return resultObject.toString();
0434:            }
0435:
0436:            /**
0437:             * return component info xml text that has only service engine infos.
0438:             * 
0439:             * @param targetNames
0440:             * @return the component info xml text.
0441:             * @throws ManagementRemoteException
0442:             *             on error
0443:             * 
0444:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceEngines(java.lang.String[])
0445:             */
0446:            public Map<String, String> listServiceEngines(String[] targetNames)
0447:                    throws ManagementRemoteException {
0448:                return this .listServiceEngines(null, null, null, targetNames);
0449:            }
0450:
0451:            /**
0452:             * return component info xml text that has only service engine infos which
0453:             * satisfies the options passed to the method.
0454:             * 
0455:             * @param state
0456:             *            return all the service engines that are in the specified
0457:             *            state. valid states are JBIComponentInfo.STARTED, STOPPED,
0458:             *            INSTALLED or null for ANY state
0459:             * @param sharedLibraryName
0460:             *            return all the service engines that have a dependency on the
0461:             *            specified shared library. null value to ignore this option.
0462:             * @param serviceAssemblyName
0463:             *            return all the service engines that have the specified service
0464:             *            assembly deployed on them. null value to ignore this option.
0465:             * @param targetNames
0466:             * @return xml text contain the list of service engine component infos
0467:             * @throws ManagementRemoteException
0468:             *             if error or exception occurs.
0469:             * 
0470:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listServiceEngines(java.lang.String,
0471:             *      java.lang.String, java.lang.String, java.lang.String[])
0472:             */
0473:            @SuppressWarnings("unchecked")
0474:            public Map<String, String> listServiceEngines(String state,
0475:                    String sharedLibraryName, String serviceAssemblyName,
0476:                    String[] targetNames) throws ManagementRemoteException {
0477:                ObjectName mbeanName = this 
0478:                        .getRuntimeManagementServiceMBeanObjectName();
0479:                Map<String, String> resultObject = null;
0480:
0481:                Object[] params = new Object[4];
0482:                params[0] = state;
0483:                params[1] = sharedLibraryName;
0484:                params[2] = serviceAssemblyName;
0485:                params[3] = targetNames;
0486:
0487:                String[] signature = new String[4];
0488:                signature[0] = "java.lang.String";
0489:                signature[1] = "java.lang.String";
0490:                signature[2] = "java.lang.String";
0491:                signature[3] = targetNames.getClass().getName();
0492:
0493:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0494:                        mbeanName, "listServiceEngines", params, signature);
0495:
0496:                return resultObject;
0497:            }
0498:
0499:            /**
0500:             * return component info xml text that has only shared library infos.
0501:             * 
0502:             * @param targetName
0503:             * @return the component info xml text.
0504:             * @throws ManagementRemoteException
0505:             *             on error
0506:             * 
0507:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraries(java.lang.String)
0508:             */
0509:            public String listSharedLibraries(String targetName)
0510:                    throws ManagementRemoteException {
0511:                return this .listSharedLibraries(null, targetName);
0512:            }
0513:
0514:            /**
0515:             * returns the list of Shared Library infos in the in a xml format
0516:             * 
0517:             * @param componentName
0518:             *            to return only the shared libraries that are this component
0519:             *            dependents. null for listing all the shared libraries in the
0520:             *            system.
0521:             * @param targetName
0522:             * @return xml string contain the list of componentinfos for shared
0523:             *         libraries.
0524:             * @throws ManagementRemoteException
0525:             *             if error or exception occurs.
0526:             * 
0527:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraries(java.lang.String,
0528:             *      java.lang.String)
0529:             */
0530:            public String listSharedLibraries(String componentName,
0531:                    String targetName) throws ManagementRemoteException {
0532:                ObjectName mbeanName = this 
0533:                        .getRuntimeManagementServiceMBeanObjectName();
0534:                Object resultObject = null;
0535:
0536:                Object[] params = new Object[2];
0537:                params[0] = componentName;
0538:                params[1] = targetName;
0539:
0540:                String[] signature = new String[2];
0541:                signature[0] = "java.lang.String";
0542:                signature[1] = "java.lang.String";
0543:
0544:                resultObject = this .invokeMBeanOperation(mbeanName,
0545:                        "listSharedLibraries", params, signature);
0546:
0547:                return resultObject.toString();
0548:            }
0549:
0550:            /**
0551:             * return component info xml text that has only shared library infos.
0552:             * 
0553:             * @param targetNames
0554:             * @return the component info xml text.
0555:             * @throws ManagementRemoteException
0556:             *             on error
0557:             * 
0558:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraries(java.lang.String[])
0559:             */
0560:            public Map<String, String> listSharedLibraries(String[] targetNames)
0561:                    throws ManagementRemoteException {
0562:                return this .listSharedLibraries(null, targetNames);
0563:            }
0564:
0565:            /**
0566:             * returns the list of Shared Library infos in the in a xml format
0567:             * 
0568:             * @param componentName
0569:             *            to return only the shared libraries that are this component
0570:             *            dependents. null for listing all the shared libraries in the
0571:             *            system.
0572:             * @param targetNames
0573:             * @return xml string contain the list of componentinfos for shared
0574:             *         libraries.
0575:             * @throws ManagementRemoteException
0576:             *             if error or exception occurs.
0577:             * 
0578:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraries(java.lang.String,
0579:             *      java.lang.String[])
0580:             */
0581:            @SuppressWarnings("unchecked")
0582:            public Map<String, String> listSharedLibraries(
0583:                    String componentName, String[] targetNames)
0584:                    throws ManagementRemoteException {
0585:                ObjectName mbeanName = this 
0586:                        .getRuntimeManagementServiceMBeanObjectName();
0587:                Map<String, String> resultObject = null;
0588:
0589:                Object[] params = new Object[2];
0590:                params[0] = componentName;
0591:                params[1] = targetNames;
0592:
0593:                String[] signature = new String[2];
0594:                signature[0] = "java.lang.String";
0595:                signature[1] = targetNames.getClass().getName();
0596:
0597:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0598:                        mbeanName, "listSharedLibraries", params, signature);
0599:
0600:                return resultObject;
0601:            }
0602:
0603:            /**
0604:             * returns a list of Binding Component and Service Engine infos in xml
0605:             * format, that are dependent upon a specified Shared Library
0606:             * 
0607:             * @param sharedLibraryName
0608:             *            the shared library name
0609:             * @param targetName
0610:             * @return xml string containing the list of componentInfos
0611:             * @throws ManagementRemoteException
0612:             *             on error
0613:             * 
0614:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraryDependents(java.lang.String,
0615:             *      java.lang.String)
0616:             */
0617:            public String listSharedLibraryDependents(String sharedLibraryName,
0618:                    String targetName) throws ManagementRemoteException {
0619:                ObjectName mbeanName = this 
0620:                        .getRuntimeManagementServiceMBeanObjectName();
0621:                Object resultObject = null;
0622:
0623:                Object[] params = new Object[2];
0624:                params[0] = sharedLibraryName;
0625:                params[1] = targetName;
0626:
0627:                String[] signature = new String[2];
0628:                signature[0] = "java.lang.String";
0629:                signature[1] = "java.lang.String";
0630:
0631:                resultObject = this .invokeMBeanOperation(mbeanName,
0632:                        "listSharedLibraryDependents", params, signature);
0633:
0634:                return resultObject.toString();
0635:            }
0636:
0637:            /**
0638:             * returns a list of Binding Component and Service Engine infos in xml
0639:             * format, that are dependent upon a specified Shared Library
0640:             * 
0641:             * @param sharedLibraryName
0642:             *            the shared library name
0643:             * @param targetNames
0644:             * @return xml string containing the list of componentInfos
0645:             * @throws ManagementRemoteException
0646:             *             on error
0647:             * 
0648:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#listSharedLibraryDependents(java.lang.String,
0649:             *      java.lang.String[])
0650:             */
0651:            @SuppressWarnings("unchecked")
0652:            public Map<String, String> listSharedLibraryDependents(
0653:                    String sharedLibraryName, String[] targetNames)
0654:                    throws ManagementRemoteException {
0655:                ObjectName mbeanName = this 
0656:                        .getRuntimeManagementServiceMBeanObjectName();
0657:                Map<String, String> resultObject = null;
0658:
0659:                Object[] params = new Object[2];
0660:                params[0] = sharedLibraryName;
0661:                params[1] = targetNames;
0662:
0663:                String[] signature = new String[2];
0664:                signature[0] = "java.lang.String";
0665:                signature[1] = targetNames.getClass().getName();
0666:
0667:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0668:                        mbeanName, "listSharedLibraryDependents", params,
0669:                        signature);
0670:
0671:                return resultObject;
0672:            }
0673:
0674:            /**
0675:             * return component info xml text for the specified binding component if
0676:             * exists. If no binding component with that name exists, it returns the xml
0677:             * with empty list.
0678:             * 
0679:             * @param name
0680:             *            name of the binding component to lookup
0681:             * @param state
0682:             *            return the binding component that is in the specified state.
0683:             *            valid states are JBIComponentInfo.STARTED, STOPPED, INSTALLED
0684:             *            or null for ANY state
0685:             * @param sharedLibraryName
0686:             *            return the binding component that has a dependency on the
0687:             *            specified shared library. null value to ignore this option.
0688:             * @param serviceAssemblyName
0689:             *            return the binding component that has the specified service
0690:             *            assembly deployed on it. null value to ignore this option.
0691:             * @param targetName
0692:             * @return xml text contain the binding component info that confirms to the
0693:             *         component info list xml grammer.
0694:             * @throws ManagementRemoteException
0695:             *             if error or exception occurs.
0696:             * 
0697:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showBindingComponent(java.lang.String,
0698:             *      java.lang.String, java.lang.String, java.lang.String,
0699:             *      java.lang.String)
0700:             */
0701:            public String showBindingComponent(String name, String state,
0702:                    String sharedLibraryName, String serviceAssemblyName,
0703:                    String targetName) throws ManagementRemoteException {
0704:                ObjectName mbeanName = this 
0705:                        .getRuntimeManagementServiceMBeanObjectName();
0706:                Object resultObject = null;
0707:
0708:                Object[] params = new Object[5];
0709:                params[0] = name;
0710:                params[1] = state;
0711:                params[2] = sharedLibraryName;
0712:                params[3] = serviceAssemblyName;
0713:                params[4] = targetName;
0714:
0715:                String[] signature = new String[5];
0716:                signature[0] = "java.lang.String";
0717:                signature[1] = "java.lang.String";
0718:                signature[2] = "java.lang.String";
0719:                signature[3] = "java.lang.String";
0720:                signature[4] = "java.lang.String";
0721:
0722:                resultObject = this .invokeMBeanOperation(mbeanName,
0723:                        "showBindingComponent", params, signature);
0724:
0725:                return resultObject.toString();
0726:            }
0727:
0728:            /**
0729:             * return component info xml text for the specified binding component if
0730:             * exists. If no binding component with that name exists, it returns the xml
0731:             * with empty list.
0732:             * 
0733:             * @param name
0734:             *            name of the binding component to lookup
0735:             * @param state
0736:             *            return the binding component that is in the specified state.
0737:             *            valid states are JBIComponentInfo.STARTED, STOPPED, INSTALLED
0738:             *            or null for ANY state
0739:             * @param sharedLibraryName
0740:             *            return the binding component that has a dependency on the
0741:             *            specified shared library. null value to ignore this option.
0742:             * @param serviceAssemblyName
0743:             *            return the binding component that has the specified service
0744:             *            assembly deployed on it. null value to ignore this option.
0745:             * @param targetNames
0746:             * @return xml text contain the binding component info that confirms to the
0747:             *         component info list xml grammer.
0748:             * @throws ManagementRemoteException
0749:             *             if error or exception occurs.
0750:             * 
0751:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showBindingComponent(java.lang.String,
0752:             *      java.lang.String, java.lang.String, java.lang.String,
0753:             *      java.lang.String[])
0754:             */
0755:            @SuppressWarnings("unchecked")
0756:            public Map<String, String> showBindingComponent(String name,
0757:                    String state, String sharedLibraryName,
0758:                    String serviceAssemblyName, String[] targetNames)
0759:                    throws ManagementRemoteException {
0760:                ObjectName mbeanName = this 
0761:                        .getRuntimeManagementServiceMBeanObjectName();
0762:                Map<String, String> resultObject = null;
0763:
0764:                Object[] params = new Object[5];
0765:                params[0] = name;
0766:                params[1] = state;
0767:                params[2] = sharedLibraryName;
0768:                params[3] = serviceAssemblyName;
0769:                params[4] = targetNames;
0770:
0771:                String[] signature = new String[5];
0772:                signature[0] = "java.lang.String";
0773:                signature[1] = "java.lang.String";
0774:                signature[2] = "java.lang.String";
0775:                signature[3] = "java.lang.String";
0776:                signature[4] = targetNames.getClass().getName();
0777:
0778:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0779:                        mbeanName, "showBindingComponent", params, signature);
0780:
0781:                return resultObject;
0782:            }
0783:
0784:            /**
0785:             * return service assembly info xml text for the specified service assembly
0786:             * if exists. If no service assembly with that name exists, it returns the
0787:             * xml with empty list.
0788:             * 
0789:             * @param name
0790:             *            name of the service assembly to lookup
0791:             * @param state
0792:             *            return the service assembly that is in the specified state.
0793:             *            JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or null for
0794:             *            ANY state
0795:             * @param componentName
0796:             *            return the service assembly that has service units on this
0797:             *            component.
0798:             * @param targetName
0799:             * @return xml string contain service assembly info that confirms to the
0800:             *         service assembly list xml grammer.
0801:             * @throws ManagementRemoteException
0802:             *             if error or exception occurs.
0803:             * 
0804:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showServiceAssembly(java.lang.String,
0805:             *      java.lang.String, java.lang.String, java.lang.String)
0806:             */
0807:            public String showServiceAssembly(String name, String state,
0808:                    String componentName, String targetName)
0809:                    throws ManagementRemoteException {
0810:                ObjectName mbeanName = this 
0811:                        .getRuntimeManagementServiceMBeanObjectName();
0812:                Object resultObject = null;
0813:
0814:                Object[] params = new Object[4];
0815:                params[0] = name;
0816:                params[1] = state;
0817:                params[2] = componentName;
0818:                params[3] = targetName;
0819:
0820:                String[] signature = new String[4];
0821:                signature[0] = "java.lang.String";
0822:                signature[1] = "java.lang.String";
0823:                signature[2] = "java.lang.String";
0824:                signature[3] = "java.lang.String";
0825:
0826:                resultObject = this .invokeMBeanOperation(mbeanName,
0827:                        "showServiceAssembly", params, signature);
0828:
0829:                return resultObject.toString();
0830:            }
0831:
0832:            /**
0833:             * return service assembly info xml text for the specified service assembly
0834:             * if exists. If no service assembly with that name exists, it returns the
0835:             * xml with empty list.
0836:             * 
0837:             * @param name
0838:             *            name of the service assembly to lookup
0839:             * @param state
0840:             *            return the service assembly that is in the specified state.
0841:             *            JBIServiceAssemblyInfo.STARTED, STOPPED, SHUTDOWN or null for
0842:             *            ANY state
0843:             * @param componentName
0844:             *            return the service assembly that has service units on this
0845:             *            component.
0846:             * @param targetNames
0847:             * @return xml string contain service assembly info that confirms to the
0848:             *         service assembly list xml grammer.
0849:             * @throws ManagementRemoteException
0850:             *             if error or exception occurs.
0851:             * 
0852:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showServiceAssembly(java.lang.String,
0853:             *      java.lang.String, java.lang.String, java.lang.String[])
0854:             */
0855:            @SuppressWarnings("unchecked")
0856:            public Map<String, String> showServiceAssembly(String name,
0857:                    String state, String componentName, String[] targetNames)
0858:                    throws ManagementRemoteException {
0859:                ObjectName mbeanName = this 
0860:                        .getRuntimeManagementServiceMBeanObjectName();
0861:                Map<String, String> resultObject = null;
0862:
0863:                Object[] params = new Object[4];
0864:                params[0] = name;
0865:                params[1] = state;
0866:                params[2] = componentName;
0867:                params[3] = targetNames;
0868:
0869:                String[] signature = new String[4];
0870:                signature[0] = "java.lang.String";
0871:                signature[1] = "java.lang.String";
0872:                signature[2] = "java.lang.String";
0873:                signature[3] = targetNames.getClass().getName();
0874:
0875:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0876:                        mbeanName, "showServiceAssembly", params, signature);
0877:
0878:                return resultObject;
0879:            }
0880:
0881:            /**
0882:             * return component info xml text for the specified service engine if
0883:             * exists. If no service engine with that name exists, it returns the xml
0884:             * with empty list.
0885:             * 
0886:             * @param name
0887:             *            name of the service engine to lookup
0888:             * @param state
0889:             *            to return all the service engines that are in the specified
0890:             *            state. JBIComponentInfo.STARTED, STOPPED, INSTALLED or null
0891:             *            for ANY state
0892:             * @param sharedLibraryName
0893:             *            to return all the service engines that have a dependency on
0894:             *            the specified shared library. Could be null for not filtering
0895:             *            the service engines for this dependency.
0896:             * @param serviceAssemblyName
0897:             *            to return all the service engines that have the specified
0898:             *            service assembly deployed on them. Could be null for not
0899:             *            filtering the service engines for this dependency.
0900:             * @param targetName
0901:             * @return xml string contain service engine component info
0902:             * @throws ManagementRemoteException
0903:             *             if error or exception occurs.
0904:             * 
0905:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showServiceEngine(java.lang.String,
0906:             *      java.lang.String, java.lang.String, java.lang.String,
0907:             *      java.lang.String)
0908:             */
0909:            public String showServiceEngine(String name, String state,
0910:                    String sharedLibraryName, String serviceAssemblyName,
0911:                    String targetName) throws ManagementRemoteException {
0912:                ObjectName mbeanName = this 
0913:                        .getRuntimeManagementServiceMBeanObjectName();
0914:                Object resultObject = null;
0915:
0916:                Object[] params = new Object[5];
0917:                params[0] = name;
0918:                params[1] = state;
0919:                params[2] = sharedLibraryName;
0920:                params[3] = serviceAssemblyName;
0921:                params[4] = targetName;
0922:
0923:                String[] signature = new String[5];
0924:                signature[0] = "java.lang.String";
0925:                signature[1] = "java.lang.String";
0926:                signature[2] = "java.lang.String";
0927:                signature[3] = "java.lang.String";
0928:                signature[4] = "java.lang.String";
0929:
0930:                resultObject = this .invokeMBeanOperation(mbeanName,
0931:                        "showServiceEngine", params, signature);
0932:
0933:                return resultObject.toString();
0934:            }
0935:
0936:            /**
0937:             * return component info xml text for the specified service engine if
0938:             * exists. If no service engine with that name exists, it returns the xml
0939:             * with empty list.
0940:             * 
0941:             * @param name
0942:             *            name of the service engine to lookup
0943:             * @param state
0944:             *            to return all the service engines that are in the specified
0945:             *            state. JBIComponentInfo.STARTED, STOPPED, INSTALLED or null
0946:             *            for ANY state
0947:             * @param sharedLibraryName
0948:             *            to return all the service engines that have a dependency on
0949:             *            the specified shared library. Could be null for not filtering
0950:             *            the service engines for this dependency.
0951:             * @param serviceAssemblyName
0952:             *            to return all the service engines that have the specified
0953:             *            service assembly deployed on them. Could be null for not
0954:             *            filtering the service engines for this dependency.
0955:             * @param targetNames
0956:             * @return xml string contain service engine component info
0957:             * @throws ManagementRemoteException
0958:             *             if error or exception occurs.
0959:             * 
0960:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showServiceEngine(java.lang.String,
0961:             *      java.lang.String, java.lang.String, java.lang.String,
0962:             *      java.lang.String[])
0963:             */
0964:            @SuppressWarnings("unchecked")
0965:            public Map<String, String> showServiceEngine(String name,
0966:                    String state, String sharedLibraryName,
0967:                    String serviceAssemblyName, String[] targetNames)
0968:                    throws ManagementRemoteException {
0969:                ObjectName mbeanName = this 
0970:                        .getRuntimeManagementServiceMBeanObjectName();
0971:                Map<String, String> resultObject = null;
0972:
0973:                Object[] params = new Object[5];
0974:                params[0] = name;
0975:                params[1] = state;
0976:                params[2] = sharedLibraryName;
0977:                params[3] = serviceAssemblyName;
0978:                params[4] = targetNames;
0979:
0980:                String[] signature = new String[5];
0981:                signature[0] = "java.lang.String";
0982:                signature[1] = "java.lang.String";
0983:                signature[2] = "java.lang.String";
0984:                signature[3] = "java.lang.String";
0985:                signature[4] = targetNames.getClass().getName();
0986:
0987:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
0988:                        mbeanName, "showServiceEngine", params, signature);
0989:
0990:                return resultObject;
0991:            }
0992:
0993:            /**
0994:             * return component info xml text for the specified shared library if
0995:             * exists. If no shared library with that name exists, it returns the xml
0996:             * with empty list.
0997:             * 
0998:             * @param name
0999:             *            name of the shared library to lookup
1000:             * @param componentName
1001:             *            return the shared library that is this component dependents.
1002:             *            null to ignore this option.
1003:             * @param targetName
1004:             * @return xml string contain shared library component info that confirms to
1005:             *         the component info list xml grammer.
1006:             * @throws ManagementRemoteException
1007:             *             if error or exception occurs.
1008:             * 
1009:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showSharedLibrary(java.lang.String,
1010:             *      java.lang.String, java.lang.String)
1011:             */
1012:            public String showSharedLibrary(String name, String componentName,
1013:                    String targetName) throws ManagementRemoteException {
1014:                ObjectName mbeanName = this 
1015:                        .getRuntimeManagementServiceMBeanObjectName();
1016:                Object resultObject = null;
1017:
1018:                Object[] params = new Object[3];
1019:                params[0] = name;
1020:                params[1] = componentName;
1021:                params[2] = targetName;
1022:
1023:                String[] signature = new String[3];
1024:                signature[0] = "java.lang.String";
1025:                signature[1] = "java.lang.String";
1026:                signature[2] = "java.lang.String";
1027:
1028:                resultObject = this .invokeMBeanOperation(mbeanName,
1029:                        "showSharedLibrary", params, signature);
1030:
1031:                return resultObject.toString();
1032:            }
1033:
1034:            /**
1035:             * return component info xml text for the specified shared library if
1036:             * exists. If no shared library with that name exists, it returns the xml
1037:             * with empty list.
1038:             * 
1039:             * @param name
1040:             *            name of the shared library to lookup
1041:             * @param componentName
1042:             *            return the shared library that is this component dependents.
1043:             *            null to ignore this option.
1044:             * @param targetNames
1045:             * @return xml string contain shared library component info that confirms to
1046:             *         the component info list xml grammer.
1047:             * @throws ManagementRemoteException
1048:             *             if error or exception occurs.
1049:             * 
1050:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#showSharedLibrary(java.lang.String,
1051:             *      java.lang.String, java.lang.String[])
1052:             */
1053:            @SuppressWarnings("unchecked")
1054:            public Map<String, String> showSharedLibrary(String name,
1055:                    String componentName, String[] targetNames)
1056:                    throws ManagementRemoteException {
1057:                ObjectName mbeanName = this 
1058:                        .getRuntimeManagementServiceMBeanObjectName();
1059:                Map<String, String> resultObject = null;
1060:
1061:                Object[] params = new Object[3];
1062:                params[0] = name;
1063:                params[1] = componentName;
1064:                params[2] = targetNames;
1065:
1066:                String[] signature = new String[3];
1067:                signature[0] = "java.lang.String";
1068:                signature[1] = "java.lang.String";
1069:                signature[2] = targetNames.getClass().getName();
1070:
1071:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1072:                        mbeanName, "showSharedLibrary", params, signature);
1073:
1074:                return resultObject;
1075:            }
1076:
1077:            /**
1078:             * shuts down component ( service engine, binding component)
1079:             * 
1080:             * @param componentName
1081:             *            name of the component
1082:             * @param force
1083:             *            true if component should be shutdown in any case, else false.
1084:             * @param targetName
1085:             * @throws ManagementRemoteException
1086:             *             on error
1087:             * @return name of the component
1088:             * 
1089:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownComponent(java.lang.String,
1090:             *      boolean, java.lang.String)
1091:             */
1092:            public String shutdownComponent(String componentName,
1093:                    boolean force, String targetName)
1094:                    throws ManagementRemoteException {
1095:                ObjectName mbeanName = this 
1096:                        .getRuntimeManagementServiceMBeanObjectName();
1097:                Object resultObject = null;
1098:
1099:                Object[] params = new Object[3];
1100:                params[0] = componentName;
1101:                params[1] = Boolean.valueOf(force);
1102:                params[2] = targetName;
1103:
1104:                String[] signature = new String[3];
1105:                signature[0] = "java.lang.String";
1106:                signature[1] = "boolean";
1107:                signature[2] = "java.lang.String";
1108:
1109:                resultObject = this .invokeMBeanOperation(mbeanName,
1110:                        "shutdownComponent", params, signature);
1111:
1112:                return resultObject.toString();
1113:            }
1114:
1115:            /**
1116:             * shuts down component ( service engine, binding component)
1117:             * 
1118:             * @param componentName
1119:             *            name of the component
1120:             * @param targetName
1121:             * @throws ManagementRemoteException
1122:             *             on error
1123:             * @return name of the component
1124:             * 
1125:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownComponent(java.lang.String,
1126:             *      java.lang.String)
1127:             */
1128:            public String shutdownComponent(String componentName,
1129:                    String targetName) throws ManagementRemoteException {
1130:                boolean force = false;
1131:                return this .shutdownComponent(componentName, force, targetName);
1132:            }
1133:
1134:            /**
1135:             * shuts down component ( service engine, binding component)
1136:             * 
1137:             * @param componentName
1138:             *            name of the component
1139:             * @param targetNames
1140:             * @throws ManagementRemoteException
1141:             *             on error
1142:             * @return name of the component
1143:             * 
1144:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownComponent(java.lang.String,
1145:             *      java.lang.String[])
1146:             */
1147:            public Map<String, String> shutdownComponent(String componentName,
1148:                    String[] targetNames) throws ManagementRemoteException {
1149:                boolean force = false;
1150:                return this 
1151:                        .shutdownComponent(componentName, force, targetNames);
1152:            }
1153:
1154:            /**
1155:             * shuts down component ( service engine, binding component)
1156:             * 
1157:             * @param componentName
1158:             *            name of the component
1159:             * @param force
1160:             *            true if component should be shutdown in any case, else false.
1161:             * @param targetNames
1162:             * @throws ManagementRemoteException
1163:             *             on error
1164:             * @return name of the component
1165:             * 
1166:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownComponent(java.lang.String,
1167:             *      boolean, java.lang.String[])
1168:             */
1169:            @SuppressWarnings("unchecked")
1170:            public Map<String, String> shutdownComponent(String componentName,
1171:                    boolean force, String[] targetNames)
1172:                    throws ManagementRemoteException {
1173:                ObjectName mbeanName = this 
1174:                        .getRuntimeManagementServiceMBeanObjectName();
1175:
1176:                Map<String, String> resultObject = null;
1177:
1178:                Object[] params = new Object[3];
1179:                params[0] = componentName;
1180:                params[1] = Boolean.valueOf(force);
1181:                params[2] = targetNames;
1182:
1183:                String[] signature = new String[3];
1184:                signature[0] = "java.lang.String";
1185:                signature[1] = "boolean";
1186:                signature[2] = targetNames.getClass().getName();
1187:
1188:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1189:                        mbeanName, "shutdownComponent", params, signature);
1190:
1191:                return resultObject;
1192:            }
1193:
1194:            /**
1195:             * shuts down service assembly
1196:             * 
1197:             * @param serviceAssemblyName
1198:             *            name of the service assembly
1199:             * @param forceShutdown
1200:             * @param targetName
1201:             *            name of the target for this operation
1202:             * @return Map of targetName and result as a management message xml text
1203:             *         strings.
1204:             * @throws ManagementRemoteException
1205:             *             on error
1206:             * 
1207:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownServiceAssembly(java.lang.String,
1208:             *      boolean, java.lang.String)
1209:             */
1210:            public String shutdownServiceAssembly(String serviceAssemblyName,
1211:                    boolean forceShutdown, String targetName)
1212:                    throws ManagementRemoteException {
1213:                ObjectName mbeanName = this 
1214:                        .getRuntimeManagementServiceMBeanObjectName();
1215:                Object resultObject = null;
1216:
1217:                Object[] params = new Object[3];
1218:                params[0] = serviceAssemblyName;
1219:                params[1] = forceShutdown;
1220:                params[2] = targetName;
1221:
1222:                String[] signature = new String[3];
1223:                signature[0] = "java.lang.String";
1224:                signature[1] = "boolean";
1225:                signature[2] = "java.lang.String";
1226:
1227:                resultObject = this .invokeMBeanOperation(mbeanName,
1228:                        "shutdownServiceAssembly", params, signature);
1229:
1230:                return resultObject.toString();
1231:            }
1232:
1233:            /**
1234:             * shuts down service assembly
1235:             * 
1236:             * @param serviceAssemblyName
1237:             *            name of the service assembly
1238:             * @param targetName
1239:             * @throws ManagementRemoteException
1240:             *             on error
1241:             * @return result as a management message xml text
1242:             * 
1243:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownServiceAssembly(java.lang.String,
1244:             *      java.lang.String)
1245:             */
1246:            public String shutdownServiceAssembly(String serviceAssemblyName,
1247:                    String targetName) throws ManagementRemoteException {
1248:                ObjectName mbeanName = this 
1249:                        .getRuntimeManagementServiceMBeanObjectName();
1250:
1251:                Object resultObject = null;
1252:
1253:                Object[] params = new Object[2];
1254:                params[0] = serviceAssemblyName;
1255:                params[1] = targetName;
1256:
1257:                String[] signature = new String[2];
1258:                signature[0] = "java.lang.String";
1259:                signature[1] = "java.lang.String";
1260:
1261:                resultObject = this .invokeMBeanOperation(mbeanName,
1262:                        "shutdownServiceAssembly", params, signature);
1263:
1264:                return resultObject.toString();
1265:            }
1266:
1267:            /**
1268:             * shuts down service assembly
1269:             * 
1270:             * @param serviceAssemblyName
1271:             *            name of the service assembly
1272:             * @param targetNames
1273:             * @throws ManagementRemoteException
1274:             *             on error
1275:             * @return result as a management message xml text
1276:             * 
1277:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownServiceAssembly(java.lang.String,
1278:             *      java.lang.String[])
1279:             */
1280:            @SuppressWarnings("unchecked")
1281:            public Map<String, String> shutdownServiceAssembly(
1282:                    String serviceAssemblyName, String[] targetNames)
1283:                    throws ManagementRemoteException {
1284:                ObjectName mbeanName = this 
1285:                        .getRuntimeManagementServiceMBeanObjectName();
1286:                Map<String, String> resultObject = null;
1287:
1288:                Object[] params = new Object[2];
1289:                params[0] = serviceAssemblyName;
1290:                params[1] = targetNames;
1291:
1292:                String[] signature = new String[2];
1293:                signature[0] = "java.lang.String";
1294:                signature[1] = targetNames.getClass().getName();
1295:
1296:                resultObject = (Map<String, String>) this 
1297:                        .invokeMBeanOperation(mbeanName,
1298:                                "shutdownServiceAssembly", params, signature);
1299:
1300:                return resultObject;
1301:            }
1302:
1303:            /**
1304:             * shuts down service assembly
1305:             * 
1306:             * @param serviceAssemblyName
1307:             *            name of the service assembly
1308:             * @param forceShutdown
1309:             * @param targetName
1310:             *            name of the target for this operation
1311:             * @return Map of targetName and result as a management message xml text
1312:             *         strings.
1313:             * @throws ManagementRemoteException
1314:             *             on error
1315:             * 
1316:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#shutdownServiceAssembly(java.lang.String,
1317:             *      boolean, java.lang.String[])
1318:             */
1319:            @SuppressWarnings("unchecked")
1320:            public Map<String, String> shutdownServiceAssembly(
1321:                    String serviceAssemblyName, boolean forceShutdown,
1322:                    String[] targetNames) throws ManagementRemoteException {
1323:                ObjectName mbeanName = this 
1324:                        .getRuntimeManagementServiceMBeanObjectName();
1325:                Map<String, String> resultObject = null;
1326:
1327:                Object[] params = new Object[3];
1328:                params[0] = serviceAssemblyName;
1329:                params[1] = forceShutdown;
1330:                params[2] = targetNames;
1331:
1332:                String[] signature = new String[3];
1333:                signature[0] = "java.lang.String";
1334:                signature[1] = "boolean";
1335:                signature[2] = targetNames.getClass().getName();
1336:
1337:                resultObject = (Map<String, String>) this 
1338:                        .invokeMBeanOperation(mbeanName,
1339:                                "shutdownServiceAssembly", params, signature);
1340:
1341:                return resultObject;
1342:            }
1343:
1344:            /**
1345:             * starts component ( service engine, binding component)
1346:             * 
1347:             * @param componentName
1348:             *            name of the component
1349:             * @throws ManagementRemoteException
1350:             *             on error
1351:             * @return name of the component
1352:             * 
1353:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#startComponent(java.lang.String,
1354:             *      java.lang.String)
1355:             */
1356:            public String startComponent(String componentName, String targetName)
1357:                    throws ManagementRemoteException {
1358:                ObjectName mbeanName = this 
1359:                        .getRuntimeManagementServiceMBeanObjectName();
1360:                Object resultObject = null;
1361:
1362:                Object[] params = new Object[2];
1363:                params[0] = componentName;
1364:                params[1] = targetName;
1365:
1366:                String[] signature = new String[2];
1367:                signature[0] = "java.lang.String";
1368:                signature[1] = "java.lang.String";
1369:
1370:                resultObject = this .invokeMBeanOperation(mbeanName,
1371:                        "startComponent", params, signature);
1372:
1373:                return resultObject.toString();
1374:            }
1375:
1376:            /**
1377:             * starts component ( service engine, binding component)
1378:             * 
1379:             * @param componentName
1380:             *            name of the component
1381:             * @param targetNames
1382:             * @throws ManagementRemoteException
1383:             *             on error
1384:             * 
1385:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#startComponent(java.lang.String,
1386:             *      java.lang.String[])
1387:             */
1388:            @SuppressWarnings("unchecked")
1389:            public Map<String, String> startComponent(String componentName,
1390:                    String[] targetNames) throws ManagementRemoteException {
1391:                ObjectName mbeanName = this 
1392:                        .getRuntimeManagementServiceMBeanObjectName();
1393:                Map<String, String> resultObject = null;
1394:
1395:                Object[] params = new Object[2];
1396:                params[0] = componentName;
1397:                params[1] = targetNames;
1398:
1399:                String[] signature = new String[2];
1400:                signature[0] = "java.lang.String";
1401:                signature[1] = targetNames.getClass().getName();
1402:
1403:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1404:                        mbeanName, "startComponent", params, signature);
1405:
1406:                return resultObject;
1407:            }
1408:
1409:            /**
1410:             * starts service assembly
1411:             * 
1412:             * @param serviceAssemblyName
1413:             *            name of the service assembly
1414:             * @param targetName
1415:             * @throws ManagementRemoteException
1416:             *             on error
1417:             * @return result as a management message xml text
1418:             * 
1419:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#startServiceAssembly(java.lang.String,
1420:             *      java.lang.String)
1421:             */
1422:            public String startServiceAssembly(String serviceAssemblyName,
1423:                    String targetName) throws ManagementRemoteException {
1424:                ObjectName mbeanName = this 
1425:                        .getRuntimeManagementServiceMBeanObjectName();
1426:                Object resultObject = null;
1427:
1428:                Object[] params = new Object[2];
1429:                params[0] = serviceAssemblyName;
1430:                params[1] = targetName;
1431:
1432:                String[] signature = new String[2];
1433:                signature[0] = "java.lang.String";
1434:                signature[1] = "java.lang.String";
1435:
1436:                resultObject = this .invokeMBeanOperation(mbeanName,
1437:                        "startServiceAssembly", params, signature);
1438:
1439:                return resultObject.toString();
1440:            }
1441:
1442:            /**
1443:             * starts service assembly
1444:             * 
1445:             * @param serviceAssemblyName
1446:             *            name of the service assembly
1447:             * @param targetNames
1448:             * @throws ManagementRemoteException
1449:             *             on error
1450:             * @return result as a management message xml text
1451:             * 
1452:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#startServiceAssembly(java.lang.String,
1453:             *      java.lang.String[])
1454:             */
1455:            @SuppressWarnings("unchecked")
1456:            public Map<String, String> startServiceAssembly(
1457:                    String serviceAssemblyName, String[] targetNames)
1458:                    throws ManagementRemoteException {
1459:                ObjectName mbeanName = this 
1460:                        .getRuntimeManagementServiceMBeanObjectName();
1461:                Map<String, String> resultObject = null;
1462:
1463:                Object[] params = new Object[2];
1464:                params[0] = serviceAssemblyName;
1465:                params[1] = targetNames;
1466:
1467:                String[] signature = new String[2];
1468:                signature[0] = "java.lang.String";
1469:                signature[1] = targetNames.getClass().getName();
1470:
1471:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1472:                        mbeanName, "startServiceAssembly", params, signature);
1473:
1474:                return resultObject;
1475:            }
1476:
1477:            /**
1478:             * stops component (service engine, binding component)
1479:             * 
1480:             * @param componentName
1481:             *            name of the component
1482:             * @param targetName
1483:             * @throws ManagementRemoteException
1484:             *             on error
1485:             * @return name of the component
1486:             * 
1487:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#stopComponent(java.lang.String,
1488:             *      java.lang.String)
1489:             */
1490:            public String stopComponent(String componentName, String targetName)
1491:                    throws ManagementRemoteException {
1492:                ObjectName mbeanName = this 
1493:                        .getRuntimeManagementServiceMBeanObjectName();
1494:                Object resultObject = null;
1495:
1496:                Object[] params = new Object[2];
1497:                params[0] = componentName;
1498:                params[1] = targetName;
1499:
1500:                String[] signature = new String[2];
1501:                signature[0] = "java.lang.String";
1502:                signature[1] = "java.lang.String";
1503:
1504:                resultObject = this .invokeMBeanOperation(mbeanName,
1505:                        "stopComponent", params, signature);
1506:
1507:                return resultObject.toString();
1508:            }
1509:
1510:            /**
1511:             * stops component (service engine, binding component)
1512:             * 
1513:             * @param componentName
1514:             *            name of the component
1515:             * @param targetNames
1516:             * @throws ManagementRemoteException
1517:             *             on error
1518:             * @return name of the component
1519:             * 
1520:             * @see com.sun.jbi.ui.common.JBIAdminCommands#stopComponent(java.lang.String,
1521:             *      java.lang.String)
1522:             * 
1523:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#stopComponent(java.lang.String,
1524:             *      java.lang.String[])
1525:             */
1526:            @SuppressWarnings("unchecked")
1527:            public Map<String, String> stopComponent(String componentName,
1528:                    String[] targetNames) throws ManagementRemoteException {
1529:                ObjectName mbeanName = this 
1530:                        .getRuntimeManagementServiceMBeanObjectName();
1531:                Map<String, String> resultObject = null;
1532:
1533:                Object[] params = new Object[2];
1534:                params[0] = componentName;
1535:                params[1] = targetNames;
1536:
1537:                String[] signature = new String[2];
1538:                signature[0] = "java.lang.String";
1539:                signature[1] = targetNames.getClass().getName();
1540:
1541:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1542:                        mbeanName, "stopComponent", params, signature);
1543:
1544:                return resultObject;
1545:            }
1546:
1547:            /**
1548:             * stops service assembly
1549:             * 
1550:             * @param serviceAssemblyName
1551:             *            name of the service assembly
1552:             * @param targetName
1553:             * @throws ManagementRemoteException
1554:             *             on error
1555:             * @return result as a management message xml text
1556:             * 
1557:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#stopServiceAssembly(java.lang.String,
1558:             *      java.lang.String)
1559:             */
1560:            public String stopServiceAssembly(String serviceAssemblyName,
1561:                    String targetName) throws ManagementRemoteException {
1562:                ObjectName mbeanName = this 
1563:                        .getRuntimeManagementServiceMBeanObjectName();
1564:                Object resultObject = null;
1565:
1566:                Object[] params = new Object[2];
1567:                params[0] = serviceAssemblyName;
1568:                params[1] = targetName;
1569:
1570:                String[] signature = new String[2];
1571:                signature[0] = "java.lang.String";
1572:                signature[1] = "java.lang.String";
1573:
1574:                resultObject = this .invokeMBeanOperation(mbeanName,
1575:                        "stopServiceAssembly", params, signature);
1576:
1577:                return resultObject.toString();
1578:            }
1579:
1580:            /**
1581:             * stops service assembly
1582:             * 
1583:             * @param serviceAssemblyName
1584:             *            name of the service assembly
1585:             * @param targetNames
1586:             * @throws ManagementRemoteException
1587:             *             on error
1588:             * @return result as a management message xml text
1589:             * 
1590:             * @see com.sun.esb.management.api.runtime.RuntimeManagementService#stopServiceAssembly(java.lang.String,
1591:             *      java.lang.String[])
1592:             */
1593:            @SuppressWarnings("unchecked")
1594:            public Map<String, String> stopServiceAssembly(
1595:                    String serviceAssemblyName, String[] targetNames)
1596:                    throws ManagementRemoteException {
1597:                ObjectName mbeanName = this 
1598:                        .getRuntimeManagementServiceMBeanObjectName();
1599:                Map<String, String> resultObject = null;
1600:
1601:                Object[] params = new Object[2];
1602:                params[0] = serviceAssemblyName;
1603:                params[1] = targetNames;
1604:
1605:                String[] signature = new String[2];
1606:                signature[0] = "java.lang.String";
1607:                signature[1] = targetNames.getClass().getName();
1608:
1609:                resultObject = (Map<String, String>) this .invokeMBeanOperation(
1610:                        mbeanName, "stopServiceAssembly", params, signature);
1611:
1612:                return resultObject;
1613:            }
1614:
1615:            /**
1616:             * @param args
1617:             */
1618:            public static void main(String[] args) {
1619:
1620:            }
1621:
1622:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.