Source Code Cross Referenced for ConfigurationService.java in  » ESB » open-esb » com » sun » esb » management » api » configuration » 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.api.configuration 
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:         * @(#)ConfigurationService.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.api.configuration;
0030:
0031:        import java.util.Map;
0032:        import java.util.Properties;
0033:        import java.util.logging.Level;
0034:
0035:        import javax.management.ObjectName;
0036:        import javax.management.openmbean.CompositeData;
0037:        import javax.management.openmbean.TabularData;
0038:
0039:        import com.sun.esb.management.common.ManagementRemoteException;
0040:        import com.sun.jbi.ui.common.JBIRemoteException;
0041:
0042:        /**
0043:         * Defines operations for common configuration services across the JBI Runtime,
0044:         * component containers, configuring logger levels, etc.
0045:         * 
0046:         * @author graj
0047:         */
0048:        public interface ConfigurationService {
0049:            /**
0050:             * Retrieve component configuration
0051:             * 
0052:             * @param componentName
0053:             * @param targetName
0054:             * @return the targetName as key and the name/value pairs as properties
0055:             * @throws ManagementRemoteException
0056:             *             on error
0057:             */
0058:            public Properties getComponentConfiguration(String componentName,
0059:                    String targetName) throws ManagementRemoteException;
0060:
0061:            /**
0062:             * Gets the extension MBean object names
0063:             * 
0064:             * @param componentName
0065:             *            name of the component
0066:             * @param extensionName
0067:             *            the name of the extension (e.g., Configuration, Logger, etc.)
0068:             * @param targetName
0069:             *            name of the target (e.g., cluster1, server, etc.)
0070:             * @return
0071:             * @throws ManagementRemoteException
0072:             *             on error
0073:             */
0074:            public Map<String /* targetInstanceName */, ObjectName[]> getComponentExtensionMBeanObjectNames(
0075:                    String componentName, String extensionName,
0076:                    String targetName) throws ManagementRemoteException;
0077:
0078:            /**
0079:             * Gets the extension MBean object names
0080:             * 
0081:             * @param componentName
0082:             *            name of the component
0083:             * @param extensionName
0084:             *            the name of the extension (e.g., Configuration, Logger, etc.)
0085:             * @param targetName
0086:             *            name of the target (e.g., cluster1, server, etc.)
0087:             * @param targetInstanceName
0088:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0089:             * @return an array of ObjectName(s)
0090:             * @throws ManagementRemoteException
0091:             *             on error
0092:             */
0093:            public ObjectName[] getComponentExtensionMBeanObjectNames(
0094:                    String componentName, String extensionName,
0095:                    String targetName, String targetInstanceName)
0096:                    throws ManagementRemoteException;
0097:
0098:            /**
0099:             * Gets the component custom loggers and their levels
0100:             * 
0101:             * @param componentName
0102:             *            name of the component
0103:             * @param targetName
0104:             *            name of the target (e.g., cluster1, server, etc.)
0105:             * @param targetInstanceName
0106:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0107:             * @return a Map of loggerCustomName to their log levels
0108:             * @throws ManagementRemoteException
0109:             *             on error
0110:             */
0111:            public Map<String /* loggerCustomName */, Level /* logLevel */> getComponentLoggerLevels(
0112:                    String componentName, String targetName,
0113:                    String targetInstanceName) throws ManagementRemoteException;
0114:
0115:            /**
0116:             * Gets the component custom loggers and their display names.
0117:             * 
0118:             * @param componentName
0119:             *            name of the component
0120:             * @param targetName
0121:             *            name of the target (e.g., cluster1, server, etc.)
0122:             * @param targetInstanceName
0123:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0124:             * @return a Map of loggerCustomName to their display names
0125:             * @throws ManagementRemoteException
0126:             *             on error
0127:             */
0128:            public Map<String /* loggerCustomName */, String /* displayName */> getComponentLoggerDisplayNames(
0129:                    String componentName, String targetName,
0130:                    String targetInstanceName) throws ManagementRemoteException;
0131:
0132:            /**
0133:             * This method returns a tabular data of a complex open data objects that
0134:             * represent the runtime configuration parameter descriptor. The parameter
0135:             * descriptor should contain the following data that represents the
0136:             * parameter.
0137:             * 
0138:             * name : name of the parameter value : value of the parameter as a String
0139:             * type. type : type of the parameter. Basic data types only. description:
0140:             * (optional) description of the parameter. displayName: (optional) display
0141:             * name of the parameter readOnly : true/false validValues : (optional) list
0142:             * of string values with ',' as delimiter. or a range value with - with a
0143:             * '-' as delimiter. min and max strings will be converted to the parameter
0144:             * type and then used to validate the value of the parameter.
0145:             * 
0146:             * @param targetName
0147:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0148:             *            configuration parameters will be set. null to represent the
0149:             *            default instance which is admin server
0150:             * 
0151:             * @return Properties that represents the list of configuration parameter
0152:             *         descriptors.
0153:             * 
0154:             * @throws ManagementRemoteException
0155:             *             if there is a jmx error accessing the instance
0156:             */
0157:            public Properties getDefaultRuntimeConfiguration()
0158:                    throws ManagementRemoteException;
0159:
0160:            /**
0161:             * This method returns a tabular data of a complex open data objects that
0162:             * represent the runtime configuration parameter descriptor. The parameter
0163:             * descriptor should contain the following data that represents the
0164:             * parameter.
0165:             * 
0166:             * name : name of the parameter value : value of the parameter as a String
0167:             * type. type : type of the parameter. Basic data types only. description:
0168:             * (optional) description of the parameter. displayName: (optional) display
0169:             * name of the parameter readOnly : true/false validValues : (optional) list
0170:             * of string values with ',' as delimiter. or a range value with - with a
0171:             * '-' as delimiter. min and max strings will be converted to the parameter
0172:             * type and then used to validate the value of the parameter.
0173:             * 
0174:             * @param targetName
0175:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0176:             *            configuration parameters will be set. null to represent the
0177:             *            default instance which is admin server
0178:             * 
0179:             * @return Properties that represents the list of configuration parameter
0180:             *         descriptors.
0181:             * 
0182:             * @throws ManagementRemoteException
0183:             *             if there is a jmx error accessing the instance
0184:             */
0185:            public Properties getRuntimeConfiguration(String targetName)
0186:                    throws ManagementRemoteException;
0187:
0188:            /**
0189:             * This method returns the runtime configuration metadata associated with
0190:             * the specified property. The metadata contain name-value pairs like:
0191:             * default, descriptionID, descriptorType, displayName, displayNameId,
0192:             * isStatic, name, resourceBundleName, tooltip, tooltipId, etc.
0193:             * 
0194:             * @param propertyKeyName
0195:             * @return Properties that represent runtime configuration metadata
0196:             * @throws ManagementRemoteException
0197:             */
0198:            Properties getRuntimeConfigurationMetaData(String propertyKeyName)
0199:                    throws ManagementRemoteException;
0200:
0201:            /**
0202:             * Lookup the level of one runtime logger
0203:             * 
0204:             * @param runtimeLoggerName
0205:             *            name of the runtime logger (e.g. com.sun.jbi.framework
0206:             * @param targetName
0207:             *            name of the target (e.g., cluster1, server, etc.)
0208:             * @param targetInstanceName
0209:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0210:             * @return a Map of loggerCustomName to their log levels
0211:             * @throws ManagementRemoteException
0212:             *             on error
0213:             * @deprecated
0214:             */
0215:            public Level getRuntimeLoggerLevel(String runtimeLoggerName,
0216:                    String targetName, String targetInstanceName)
0217:                    throws ManagementRemoteException;
0218:
0219:            /**
0220:             * Gets all the runtime loggers and their display names
0221:             * 
0222:             * @param targetName
0223:             *            name of the target (e.g., cluster1, server, etc.)
0224:             * @param targetInstanceName
0225:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0226:             * @return a Map of display names to their logger names
0227:             * @throws ManagementRemoteException
0228:             *             on error
0229:             * @deprecated
0230:             */
0231:            public Map<String /* display name */, String /* logger name */> getRuntimeLoggerNames(
0232:                    String targetName, String targetInstanceName)
0233:                    throws ManagementRemoteException;
0234:
0235:            /**
0236:             * Gets all the runtime loggers and their levels
0237:             * 
0238:             * @param targetName
0239:             *            name of the target (e.g., cluster1, server, etc.)
0240:             * @param targetInstanceName
0241:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0242:             * @return a Map of loggerCustomName to their log levels
0243:             * @throws ManagementRemoteException
0244:             *             on error
0245:             * @deprecated
0246:             */
0247:            public Map<String /* runtimeLoggerName */, Level /* logLevel */> getRuntimeLoggerLevels(
0248:                    String targetName, String targetInstanceName)
0249:                    throws ManagementRemoteException;
0250:
0251:            /**
0252:             * Lookup the level of one runtime logger
0253:             * 
0254:             * @param runtimeLoggerName
0255:             *            name of the runtime logger (e.g. com.sun.jbi.framework
0256:             * @param targetName
0257:             *            name of the target (e.g., cluster1, server, etc.)
0258:             * @return a Map of loggerCustomName to their log levels
0259:             * @throws ManagementRemoteException
0260:             *             on error
0261:             */
0262:            public Level getRuntimeLoggerLevel(String runtimeLoggerName,
0263:                    String targetName) throws ManagementRemoteException;
0264:
0265:            /**
0266:             * Gets all the runtime loggers and their display names
0267:             * 
0268:             * @param targetName
0269:             *            name of the target (e.g., cluster1, server, etc.)
0270:             * @return a Map of display names to their logger names
0271:             * @throws ManagementRemoteException
0272:             *             on error
0273:             */
0274:            public Map<String /* display name */, String /* logger name */> getRuntimeLoggerNames(
0275:                    String targetName) throws ManagementRemoteException;
0276:
0277:            /**
0278:             * Gets all the runtime loggers and their levels
0279:             * 
0280:             * @param targetName
0281:             *            name of the target (e.g., cluster1, server, etc.)
0282:             * @return a Map of loggerCustomName to their log levels
0283:             * @throws ManagementRemoteException
0284:             *             on error
0285:             */
0286:            public Map<String /* runtimeLoggerName */, Level /* logLevel */> getRuntimeLoggerLevels(
0287:                    String targetName) throws ManagementRemoteException;
0288:
0289:            /**
0290:             * checks if the server need to be restarted to apply the changes made to
0291:             * some of the configuration parameters.
0292:             * 
0293:             * @return true if server needs to be restarted for updated configuration to
0294:             *         take effect. false if no server restart is needed.
0295:             * @throws ManagementRemoteException
0296:             *             if there is a jmx error accessing the instance
0297:             */
0298:            public boolean isServerRestartRequired()
0299:                    throws ManagementRemoteException;
0300:
0301:            /**
0302:             * Will return jbi mgmt message with success, failure, or partial success
0303:             * per instance. The entry per instance will have value as part of the
0304:             * management message (XML) String.
0305:             * 
0306:             * @param componentName
0307:             * @param configurationValue
0308:             * @param targetName
0309:             * @return value as part of the management message (XML) String.
0310:             * @throws ManagementRemoteException
0311:             *             on error
0312:             */
0313:            public String setComponentConfiguration(String componentName,
0314:                    Properties configurationValues, String targetName)
0315:                    throws ManagementRemoteException;
0316:
0317:            /**
0318:             * Sets the component log level for a given custom logger
0319:             * 
0320:             * @param componentName
0321:             *            name of the component
0322:             * @param loggerCustomName
0323:             *            the custom logger name
0324:             * @param logLevel
0325:             *            the level to set the logger
0326:             * @param targetName
0327:             *            name of the target (e.g., cluster1, server, etc.)
0328:             * @param targetInstanceName
0329:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0330:             * @throws ManagementRemoteException
0331:             *             on error
0332:             */
0333:            public void setComponentLoggerLevel(String componentName,
0334:                    String loggerCustomName, Level logLevel, String targetName,
0335:                    String targetInstanceName) throws ManagementRemoteException;
0336:
0337:            /**
0338:             * This method sets one or more configuration parameters on the runtime with
0339:             * a list of name/value pairs passed as a properties object. The property
0340:             * name in the properties object should be an existing configuration
0341:             * parameter name. If user try to set the parameter that is not in the
0342:             * configuration parameters list, this method will throw an exception.
0343:             * 
0344:             * The value of the property can be any object. If the value is non string
0345:             * object, its string value (Object.toString()) will be used as a value that
0346:             * will be set on the configuration.
0347:             * 
0348:             * This method first validates whether all the paramters passed in
0349:             * properties object exist in the runtime configuration or not. If any one
0350:             * the parameters passed is not existing, it will return an error without
0351:             * settings the parameters that are passed in the properties including a
0352:             * valid parameters.
0353:             * 
0354:             * If there is an error in setting a paramter, this method throws an
0355:             * exception with the list of parameters that were not set.
0356:             * 
0357:             * @param params
0358:             *            Properties object that contains name/value pairs corresponding
0359:             *            to the configuration parameters to be set on the runtime.
0360:             * 
0361:             * @param targetName
0362:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0363:             *            configuration parameters will be set. null to represent the
0364:             *            default instance which is admin server
0365:             * 
0366:             * @return true if server restart is required, false if not
0367:             * 
0368:             * @throws ManagementRemoteException
0369:             *             if there is a jmx error or a invalid parameter is passed in
0370:             *             the params properties object. In case of an error setting the
0371:             *             a particular parameter, the error message should list the
0372:             *             invalid parameters.
0373:             */
0374:            public boolean setRuntimeConfiguration(Properties parameters,
0375:                    String targetName) throws ManagementRemoteException;
0376:
0377:            /**
0378:             * Sets the log level for a given runtime logger
0379:             * 
0380:             * @param runtimeLoggerName
0381:             *            name of the runtime logger
0382:             * @param logLevel
0383:             *            the level to set the logger
0384:             * @param targetName
0385:             *            name of the target (e.g., cluster1, server, etc.)
0386:             * @param targetInstanceName
0387:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0388:             * @throws ManagementRemoteException
0389:             *             on error
0390:             * @deprecated
0391:             */
0392:            public void setRuntimeLoggerLevel(String runtimeLoggerName,
0393:                    Level logLevel, String targetName, String targetInstanceName)
0394:                    throws ManagementRemoteException;
0395:
0396:            /**
0397:             * Sets the log level for a given runtime logger
0398:             * 
0399:             * @param runtimeLoggerName
0400:             *            name of the runtime logger
0401:             * @param logLevel
0402:             *            the level to set the logger
0403:             * @param targetName
0404:             *            name of the target (e.g., cluster1, server, etc.)
0405:             * @throws ManagementRemoteException
0406:             *             on error
0407:             */
0408:            public void setRuntimeLoggerLevel(String runtimeLoggerName,
0409:                    Level logLevel, String targetName)
0410:                    throws ManagementRemoteException;
0411:
0412:            /**
0413:             * Return the display name for a runtime logger
0414:             * 
0415:             * @param runtimeLoggerName
0416:             *            name of the logger (e.g. com.sun.jbi.framework)
0417:             * @param targetName
0418:             *            name of the target (e.g., cluster1, server, etc.)
0419:             * @param targetInstanceName
0420:             *            name of the target instance (e.g., cluster1-instance1, etc.)
0421:             * @return the display name for the given logger
0422:             * @throws JBIRemoteException
0423:             *             on error
0424:             * @deprecated
0425:             */
0426:            public String getRuntimeLoggerDisplayName(String runtimeLoggerName,
0427:                    String targetName, String targetInstanceName)
0428:                    throws ManagementRemoteException;
0429:
0430:            /**
0431:             * Return the display name for a runtime logger
0432:             * 
0433:             * @param runtimeLoggerName
0434:             *            name of the logger (e.g. com.sun.jbi.framework)
0435:             * @param targetName
0436:             *            name of the target (e.g., cluster1, server, etc.)
0437:             * @return the display name for the given logger
0438:             * @throws JBIRemoteException
0439:             *             on error
0440:             */
0441:            public String getRuntimeLoggerDisplayName(String runtimeLoggerName,
0442:                    String targetName) throws ManagementRemoteException;
0443:
0444:            ////////////////////////////////////////////////////
0445:            // Application Configuration & Application Variables
0446:            ////////////////////////////////////////////////////
0447:
0448:            /**
0449:             * This method is used to verify if the application variables and 
0450:             * application configuration objects used in the given 
0451:             * application are available in JBI runtime in the specified target. 
0452:             * Also this method verifies if all necessary  components are installed.
0453:             * If generateTemplates is true templates for missing application variables 
0454:             * and application configurations are generated. A command script that uses
0455:             * the template files to set configuration objects is generated.
0456:             *
0457:             * @param applicationURL the URL for the application zip file
0458:             * @param generateTemplates true if templates have to be generated
0459:             * @param templateDir the dir to store the generated templates
0460:             * @param includeDeployCommand true if the generated script should include
0461:             * deploy command 
0462:             * @param targetName the target on which the application has to be verified
0463:             *
0464:             * @returns CompositeData the verification report
0465:             * 
0466:             * CompositeType of verification report
0467:             *  String          - "ServiceAssemblyName",
0468:             *  String          - "ServiceAssemblyDescription",
0469:             *  Integer         - "NumServiceUnits",
0470:             *  Boolean         - "AllComponentsInstalled",
0471:             *  String[]        - "MissingComponentsList",
0472:             *  CompositeData[] - "EndpointInfo",
0473:             *  String          - "TemplateZIPID"
0474:             * 
0475:             * CompositeType of each EndpointInfo
0476:             *  String    - "EndpointName",
0477:             *  String    - "ServiceUnitName",
0478:             *  String    - "ComponentName",
0479:             *  String    - "Status"
0480:             * 
0481:             * @throws ManagementRemoteException if the application could not be verified
0482:             * 
0483:             * Note: param templateDir is used between ant/cli and common client client
0484:             * TemplateZIPID is used between common client server and common client client
0485:             */
0486:            public String verifyApplication(String applicationURL,
0487:                    boolean generateTemplates, String templateDir,
0488:                    boolean includeDeployCommand, String targetName)
0489:                    throws ManagementRemoteException;
0490:
0491:            /**
0492:             * This method is used to export the application variables and 
0493:             * application configuration objects used by the given 
0494:             * application in the specified target. 
0495:             *
0496:             * @param applicationName the name of the application
0497:             * @param targetName the target whose configuration has to be exported
0498:             * @param configDir the dir to store the configurations
0499:             * @returns String the id for the zip file with exported configurations
0500:             *
0501:             * @throws ManagementRemoteException if the application configuration could not be exported
0502:             *
0503:             * Note: param configDir is used between ant/cli and common client client.
0504:             * The return value is used between common client server and common client client.
0505:             */
0506:            public String exportApplicationConfiguration(
0507:                    String applicationName, String targetName, String configDir)
0508:                    throws ManagementRemoteException;
0509:
0510:            /**
0511:             * Detect the components support for component configuration. This method
0512:             * returns true if the component has a configuration MBean with configurable
0513:             * attributes
0514:             *
0515:             * @param componentName 
0516:             *            component identification
0517:             * @param targetName 
0518:             *              identification of the target. Can be a standalone server,
0519:             *              cluster or clustered instance.
0520:             * @return true if the components configuration MBean has configuration 
0521:             *              attributes
0522:             * @throws ManagementRemoteException if the component is not installed or is not 
0523:             *         in the Started state.
0524:             * 
0525:             */
0526:            public boolean isComponentConfigSupported(String componentName,
0527:                    String targetName) throws ManagementRemoteException;
0528:
0529:            /*----------------------------------------------------------------------------------*\
0530:             *              Operations for Application Variable Management                      *
0531:            \*----------------------------------------------------------------------------------*/
0532:
0533:            /**
0534:             * Detect the components support for application configuration. This method
0535:             * returns true if the component has a configuration MBean and implements 
0536:             * all the operations for application configuration management.
0537:             *
0538:             * @param componentName 
0539:             *            component identification
0540:             * @param targetName 
0541:             *              identification of the target. Can be a standalone server,
0542:             *              cluster or clustered instance.
0543:             * @return true if the components configuration MBean implements all the
0544:             *         operations for application configuration.
0545:             * @throws ManagementRemoteException if the component is not installed or is not 
0546:             *         in the Started state.
0547:             * 
0548:             */
0549:            public boolean isAppConfigSupported(String componentName,
0550:                    String targetName) throws ManagementRemoteException;
0551:
0552:            /**
0553:             * Detect the components support for application variables. This method
0554:             * returns true if the component has a configuration MBean and implements 
0555:             * all the operations for application variable management.
0556:             *
0557:             * @param componentName 
0558:             *            component identification
0559:             * @param targetName 
0560:             *              identification of the target. Can be a standalone server,
0561:             *              cluster or clustered instance.
0562:             * @return true if the components configuration MBean implements all the
0563:             *         operations for application variables.
0564:             * @throws ManagementRemoteException if the component is not installed or is not 
0565:             *         in the Started state.
0566:             * 
0567:             */
0568:            public boolean isAppVarsSupported(String componentName,
0569:                    String targetName) throws ManagementRemoteException;
0570:
0571:            /**
0572:             * Add application variables to a component installed on a given target. If even a
0573:             * variable from the set is already set on the component, this operation fails.
0574:             * 
0575:             * @param componentName 
0576:             *            component identification
0577:             * @param targetName 
0578:             *              identification of the target. Can be a standalone server,
0579:             *              cluster or clustered instance.
0580:             * @param  appVariables - set of application variables to add. The values of the
0581:             *                     application variables have the application variable type and
0582:             *                     value and the format is "[type]value"
0583:             * @return
0584:             *             a JBI Management message indicating the status of the operation.
0585:             *             In case a variable is not added the management message has a 
0586:             *             ERROR task status message giving the details of the failure.
0587:             * @throws ManagementRemoteException
0588:             *             if there is a jmx error accessing the instance
0589:             */
0590:            public String addApplicationVariables(String componentName,
0591:                    String targetName, Properties appVariables)
0592:                    throws ManagementRemoteException;
0593:
0594:            /**
0595:             * Set application variables on a component installed on a given target. If even a
0596:             * variable from the set has not been added to the component, this operation fails.
0597:             * 
0598:             * @param componentName 
0599:             *             component identification
0600:             * @param  appVariables - set of application variables to update. The values of the
0601:             *                     application variables have the application variable type and
0602:             *                     value and the format is "[type]value"
0603:             * @param targetName 
0604:             *              identification of the target. Can be a standalone server,
0605:             *             cluster or clustered instance.
0606:             * @return
0607:             *             a JBI Management message indicating the status of the operation.
0608:             *             In case a variable is not set the management message has a 
0609:             *             ERROR task status message giving the details of the failure.
0610:             * @throws ManagementRemoteException
0611:             *             if there is a jmx error accessing the instance
0612:             */
0613:            public String setApplicationVariables(String componentName,
0614:                    Properties appVariables, String targetName)
0615:                    throws ManagementRemoteException;
0616:
0617:            /**
0618:             * Delete application variables from a component installed on a given target. If even a
0619:             * variable from the set has not been added to the component, this operation fails.
0620:             * 
0621:             * @param componentName
0622:             *             component identification
0623:             * @param targetName
0624:             *            identification of the target. Can be a standalone server, 
0625:             *            cluster or clustered instance.
0626:             * @param  appVariableNames - names  of application variables to delete.
0627:             * @return
0628:             *             a JBI Management message indicating the status of the operation.
0629:             *             In case a variable is not deleted the management message has a 
0630:             *             ERROR task status message giving the details of the failure.
0631:             * @throws ManagementRemoteException
0632:             *             if there is a jmx error accessing the instance
0633:             */
0634:            public String deleteApplicationVariables(String componentName,
0635:                    String targetName, String[] appVariableNames)
0636:                    throws ManagementRemoteException;
0637:
0638:            /**
0639:             * Get all the application variables set on a component.
0640:             *
0641:             * @return all the application variables et on the component. The return proerties
0642:             *         set has the name="[type]value" pairs for the application variables.
0643:             * @return
0644:             *             a JBI Management message indicating the status of the operation.
0645:             * @throws ManagementRemoteException
0646:             *             if there is a jmx error accessing the instance
0647:             */
0648:            public Properties getApplicationVariables(String componentName,
0649:                    String targetName) throws ManagementRemoteException;
0650:
0651:            /*----------------------------------------------------------------------------------*\
0652:             *              Operations for Application Configuration Management                 *
0653:            \*----------------------------------------------------------------------------------*/
0654:
0655:            /**
0656:             * Get the CompositeType definition for the components application configuration 
0657:             * @param componentName
0658:             *            component identification
0659:             * @param targetName
0660:             *            identification of the target. Can be a standalone server,
0661:             *            cluster or clustered instance.
0662:             * @return the CompositeType for the components application configuration.
0663:             */
0664:            public javax.management.openmbean.CompositeType queryApplicationConfigurationType(
0665:                    String componentName, String targetName)
0666:                    throws ManagementRemoteException;
0667:
0668:            /**
0669:             * Add a named application configuration to a component installed on a given target. 
0670:             *
0671:             * @param componentName 
0672:             *            component identification
0673:             * @param targetName 
0674:             *              identification of the target. Can be a standalone server,
0675:             *              cluster or clustered instance.
0676:             * @param name 
0677:             *             application configuration name
0678:             * @param config 
0679:             *             application configuration represented as a set of properties.
0680:             * @return
0681:             *             a JBI Management message indicating the status of the operation.
0682:             * @throws ManagementRemoteException
0683:             *             if there is a jmx error accessing the instance
0684:             */
0685:            public String addApplicationConfiguration(String componentName,
0686:                    String targetName, String name, Properties config)
0687:                    throws ManagementRemoteException;
0688:
0689:            /**
0690:             * Update a named application configuration in a component installed on a given target. 
0691:             *
0692:             * @param componentName 
0693:             *            component identification
0694:             * @param name 
0695:             *             application configuration name
0696:             * @param config 
0697:             *             application configuration represented as a set of properties.
0698:             * @param targetName 
0699:             *              identification of the target. Can be a standalone server,
0700:             *              cluster or clustered instance.
0701:             * @return
0702:             *             a JBI Management message indicating the status of the operation.
0703:             * @throws ManagementRemoteException
0704:             *             if there is a jmx error accessing the instance
0705:             */
0706:            public String setApplicationConfiguration(String componentName,
0707:                    String name, Properties config, String targetName)
0708:                    throws ManagementRemoteException;
0709:
0710:            /**
0711:             * Delete a named application configuration in a component installed on a given target. 
0712:             *
0713:             * @param componentName 
0714:             *            component identification
0715:             * @param targetName 
0716:             *              identification of the target. Can be a standalone server,
0717:             *              cluster or clustered instance.
0718:             * @param name 
0719:             *             name of application configuration to be deleted
0720:             * @return
0721:             *             a JBI Management message indicating the status of the operation.
0722:             * @throws ManagementRemoteException
0723:             *             if there is a jmx error accessing the instance
0724:             */
0725:            public String deleteApplicationConfiguration(String componentName,
0726:                    String targetName, String name)
0727:                    throws ManagementRemoteException;
0728:
0729:            /**
0730:             * List all the application configurations in a component.
0731:             *
0732:             * @param componentName 
0733:             *            component identification
0734:             * @param targetName 
0735:             *              identification of the target. Can be a standalone server,
0736:             *              cluster or clustered instance.
0737:             * @return
0738:             *              an array of names of all the application configurations.
0739:             * @throws ManagementRemoteException
0740:             *             if there is a jmx error accessing the instance
0741:             */
0742:            public String[] listApplicationConfigurationNames(
0743:                    String componentName, String targetName)
0744:                    throws ManagementRemoteException;
0745:
0746:            /**
0747:             * Get a specific named configuration. If the named configuration does not exist
0748:             * in the component the returned properties is an empty set.
0749:             *
0750:             * @param componentName 
0751:             *            component identification
0752:             * @param targetName 
0753:             *              identification of the target. Can be a standalone server,
0754:             *              cluster or clustered instance.
0755:             * @return the application configuration represented as a set of properties.
0756:             * @throws ManagementRemoteException
0757:             *             if there is a jmx error accessing the instance
0758:             */
0759:            public Properties getApplicationConfiguration(String componentName,
0760:                    String name, String targetName)
0761:                    throws ManagementRemoteException;
0762:
0763:            /**
0764:             * Get all the application configurations set on a component.
0765:             *
0766:             * @param componentName 
0767:             *            component identification
0768:             * @param targetName 
0769:             *              identification of the target. Can be a standalone server,
0770:             *              cluster or clustered instance.
0771:             * @return 
0772:             *             a map of all the application configurations keyed by the 
0773:             *             configuration name.
0774:             * @throws ManagementRemoteException
0775:             *             if there is a jmx error accessing the instance
0776:             */
0777:            public Map<String, Properties> getApplicationConfigurations(
0778:                    String componentName, String targetName)
0779:                    throws ManagementRemoteException;
0780:
0781:            /** 
0782:             * Retrieves the component specific configuration schema.
0783:             *
0784:             * @param componentName
0785:             *        component identification
0786:             * @param targetName
0787:             *        identification of the target. Can be a standalone server,
0788:             *        cluster or clustered instance.
0789:             * @return a String containing the configuration schema.
0790:             * @throws ManagementRemoteException if the config schema cannot be retrieved.
0791:             */
0792:            public String retrieveConfigurationDisplaySchema(
0793:                    String componentName, String targetName)
0794:                    throws ManagementRemoteException;;
0795:
0796:            /** 
0797:             * Retrieves the component configuration metadata.
0798:             * The XML data conforms to the component 
0799:             * configuration schema.
0800:             *
0801:             * @param componentName
0802:             *        component identification
0803:             * @param targetName
0804:             *        identification of the target. Can be a standalone server,
0805:             *        cluster or clustered instance.
0806:             * @return a String containing the configuration metadata.
0807:             * @throws ManagementRemoteException if the config data cannot be retrieved.
0808:             */
0809:            public String retrieveConfigurationDisplayData(
0810:                    String componentName, String targetName)
0811:                    throws ManagementRemoteException;
0812:
0813:            /**
0814:             * Add an application configuration. The configuration name is a part of the CompositeData.
0815:             * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
0816:             *
0817:             * @param componentName
0818:             * @param targetName
0819:             * @param name - configuration name, must match the value of the field "name" in the namedConfig
0820:             * @param appConfig - application configuration composite 
0821:             * @return management message string which gives the status of the operation. For 
0822:             *         target=cluster, instance specific details are included. 
0823:             * @throws ManagementRemoteException if the application configuration cannot be added.
0824:             */
0825:            String addApplicationConfiguration(String componentName,
0826:                    String targetName, String name, CompositeData appConfig)
0827:                    throws ManagementRemoteException;
0828:
0829:            /**
0830:             * Update a application configuration. The configuration name is a part of the CompositeData.
0831:             * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
0832:             *
0833:             * @param componentName
0834:             * @param targetName
0835:             * @param name - configuration name, must match the value of the field "configurationName" in the appConfig
0836:             * @param appConfig - application configuration composite
0837:             * @return management message string which gives the status of the operation. For 
0838:             *         target=cluster, instance specific details are included. 
0839:             * @throws ManagementRemoteException if there are errors encountered when updating the configuration.
0840:             */
0841:            String setApplicationConfiguration(String componentName,
0842:                    String targetName, String name, CompositeData appConfig)
0843:                    throws ManagementRemoteException;
0844:
0845:            /**
0846:             * Get a Map of all application configurations for the component.
0847:             *
0848:             * @param componentName
0849:             * @param targetName
0850:             * @return a TabularData of all the application configurations for a 
0851:             *         component keyed by the configuration name. 
0852:             * @throws ManagementRemoteException if there are errors encountered when updating the configuration.
0853:             */
0854:            TabularData getApplicationConfigurationsAsTabularData(
0855:                    String componentName, String targetName)
0856:                    throws ManagementRemoteException;
0857:
0858:            /**
0859:             * Get the Application Variable set for a component.
0860:             *
0861:             * @param componentName
0862:             * @param targetName
0863:             * @return  a TabularData which has all the application variables set on the component. 
0864:             * @throws ManagementRemoteException
0865:             */
0866:            TabularData getApplicationVariablesAsTabularData(
0867:                    String componentName, String targetName)
0868:                    throws ManagementRemoteException;
0869:
0870:            /**
0871:             * This operation adds a new application variable. If a variable already exists with 
0872:             * the same name as that specified then the operation fails.
0873:             * 
0874:             * @param componentName
0875:             * @param targetName
0876:             * @param name - name of the application variable
0877:             * @param appVar - this is the application variable compoiste
0878:             * @return management message string which gives the status of the operation. For 
0879:             *         target=cluster, instance specific details are included. 
0880:             * @throws ManagementRemoteException if an error occurs in adding the application variables to the 
0881:             *         component. 
0882:             */
0883:            String addApplicationVariable(String componentName,
0884:                    String targetName, String name, CompositeData appVar)
0885:                    throws ManagementRemoteException;
0886:
0887:            /**
0888:             * This operation sets an application variable. If a variable does not exist with 
0889:             * the same name, its an error.
0890:             * 
0891:             * @param componentName
0892:             * @param targetName
0893:             * @param name - name of the application variable
0894:             * @param appVar - this is the application variable compoiste to be updated.
0895:             * @return management message string which gives the status of the operation. For 
0896:             *         target=cluster, instance specific details are included. 
0897:             * @throws ManagementRemoteException if one or more application variables cannot be deleted
0898:             */
0899:            String setApplicationVariable(String componentName,
0900:                    String targetName, String name, CompositeData appVar)
0901:                    throws ManagementRemoteException;
0902:
0903:            /**
0904:             * This method returns a tabular data of a complex open data objects that
0905:             * represent the runtime configuration parameter descriptor. The parameter
0906:             * descriptor should contain the following data that represents the
0907:             * parameter.
0908:             * 
0909:             * name : name of the parameter value : value of the parameter as a String
0910:             * type. type : type of the parameter. Basic data types only. description:
0911:             * (optional) description of the parameter. displayName: (optional) display
0912:             * name of the parameter readOnly : true/false validValues : (optional) list
0913:             * of string values with ',' as delimiter. or a range value with - with a
0914:             * '-' as delimiter. min and max strings will be converted to the parameter
0915:             * type and then used to validate the value of the parameter.
0916:             * 
0917:             * @param targetName
0918:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0919:             *            configuration parameters will be set. null to represent the
0920:             *            default instance which is admin server
0921:             * 
0922:             * @return Map that represents the list of configuration parameter
0923:             *         descriptors.
0924:             * 
0925:             * @throws ManagementRemoteException
0926:             *             if there is a jmx error accessing the instance
0927:             */
0928:            public Map<String /*attributeName*/, Object /*attributeValue*/> getDefaultRuntimeConfigurationAsMap()
0929:                    throws ManagementRemoteException;
0930:
0931:            /**
0932:             * This method returns a tabular data of a complex open data objects that
0933:             * represent the runtime configuration parameter descriptor. The parameter
0934:             * descriptor should contain the following data that represents the
0935:             * parameter.
0936:             * 
0937:             * name : name of the parameter value : value of the parameter as a String
0938:             * type. type : type of the parameter. Basic data types only. description:
0939:             * (optional) description of the parameter. displayName: (optional) display
0940:             * name of the parameter readOnly : true/false validValues : (optional) list
0941:             * of string values with ',' as delimiter. or a range value with - with a
0942:             * '-' as delimiter. min and max strings will be converted to the parameter
0943:             * type and then used to validate the value of the parameter.
0944:             * 
0945:             * @param targetName
0946:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0947:             *            configuration parameters will be set. null to represent the
0948:             *            default instance which is admin server
0949:             * 
0950:             * @return Map that represents the list of configuration parameter
0951:             *         descriptors.
0952:             * 
0953:             * @throws ManagementRemoteException
0954:             *             if there is a jmx error accessing the instance
0955:             */
0956:            public Map<String /*attributeName*/, Object /*attributeValue*/> getRuntimeConfigurationAsMap(
0957:                    String targetName) throws ManagementRemoteException;
0958:
0959:            /**
0960:             * This method sets one or more configuration parameters on the runtime with
0961:             * a list of name/value pairs passed as a properties object. The property
0962:             * name in the properties object should be an existing configuration
0963:             * parameter name. If user try to set the parameter that is not in the
0964:             * configuration parameters list, this method will throw an exception.
0965:             * 
0966:             * The value of the property can be any object. If the value is non string
0967:             * object, its string value (Object.toString()) will be used as a value that
0968:             * will be set on the configuration.
0969:             * 
0970:             * This method first validates whether all the paramters passed in
0971:             * properties object exist in the runtime configuration or not. If any one
0972:             * the parameters passed is not existing, it will return an error without
0973:             * settings the parameters that are passed in the properties including a
0974:             * valid parameters.
0975:             * 
0976:             * If there is an error in setting a paramter, this method throws an
0977:             * exception with the list of parameters that were not set.
0978:             * 
0979:             * @param params
0980:             *            Map object that contains name/value pairs corresponding
0981:             *            to the configuration parameters to be set on the runtime.
0982:             * 
0983:             * @param targetName
0984:             *            cluster or instance name ( e.g. cluster1, instance1 ) on which
0985:             *            configuration parameters will be set. null to represent the
0986:             *            default instance which is admin server
0987:             * 
0988:             * @return true if server restart is required, false if not
0989:             * 
0990:             * @throws ManagementRemoteException
0991:             *             if there is a jmx error or a invalid parameter is passed in
0992:             *             the params properties object. In case of an error setting the
0993:             *             a particular parameter, the error message should list the
0994:             *             invalid parameters.
0995:             */
0996:            public boolean setRuntimeConfiguration(
0997:                    Map<String /*attributeName*/, Object /*attributeValue*/> parameters,
0998:                    String targetName) throws ManagementRemoteException;
0999:
1000:            /**
1001:             * Retrieve component configuration
1002:             * 
1003:             * @param componentName
1004:             * @param targetName
1005:             * @return the targetName as key and the name/value pairs as Map
1006:             * @throws ManagementRemoteException
1007:             *             on error
1008:             */
1009:            public Map<String /*attributeName*/, Object /*attributeValue*/> getComponentConfigurationAsMap(
1010:                    String componentName, String targetName)
1011:                    throws ManagementRemoteException;
1012:
1013:            /**
1014:             * Will return jbi mgmt message with success, failure, or partial success
1015:             * per instance. The entry per instance will have value as part of the
1016:             * management message (XML) String.
1017:             * 
1018:             * @param componentName
1019:             * @param configurationValues
1020:             * @param targetName
1021:             * @return value as part of the management message (XML) String.
1022:             * @throws ManagementRemoteException
1023:             *             on error
1024:             */
1025:            public String setComponentConfiguration(
1026:                    String componentName,
1027:                    Map<String /*attributeName*/, Object /*attributeValue*/> configurationValues,
1028:                    String targetName) throws ManagementRemoteException;
1029:
1030:            /**
1031:             * Invokes an operation on an Extension MBean.
1032:             * @param componentName
1033:             * @param extensionName the name of the extension (e.g., Configuration, Logger, etc.)
1034:             * @param operationName The name of the operation to be invoked.
1035:             * @param parameters An array containing the parameters to be set when the operation is invoked
1036:             * @param signature An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
1037:             * @param targetName name of the target (e.g., server, Cluster1, StandloneServer2, etc.)
1038:             * @param targetInstanceName name of the target instance (e.g., Cluster1-Instance1, Cluster2-Instance10, etc.)
1039:             * @return The object returned by the operation, which represents the result of invoking the operation on the Extension MBean specified.
1040:             * @throws ManagementRemoteException
1041:             */
1042:            public Object invokeExtensionMBeanOperation(String componentName,
1043:                    String extensionName, String operationName,
1044:                    Object[] parameters, String[] signature, String targetName,
1045:                    String targetInstanceName) throws ManagementRemoteException;
1046:
1047:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.