001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)CustomConfigMBean.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package java4ant;
030:
031: import javax.management.MBeanException;
032: import javax.management.openmbean.CompositeData;
033: import javax.management.openmbean.CompositeType;
034: import javax.management.openmbean.TabularData;
035:
036: public interface CustomConfigurationMBean {
037: /**
038: * Test method.
039: */
040: public String getComponentCustomInfo();
041:
042: /**
043: * Getters/Setters for attributes
044: */
045: public String getA();
046:
047: public void setA(String a);
048:
049: public String getB();
050:
051: public void setB(String b);
052:
053: public String getC();
054:
055: public void setC(String c);
056:
057: /**
058: * This operation adds a new application variable. If a variable already exists with
059: * the same name as that specified then the operation fails.
060: *
061: * @param name - name of the application variable
062: * @param appVar - this is the application variable compoiste
063: * @throws MBeanException if an error occurs in adding the application variables to the
064: * component.
065: * @return management message string which gives the status of the operation. For
066: * target=cluster, instance specific details are included.
067: */
068: public void addApplicationVariable(String name, CompositeData appVar)
069: throws MBeanException;
070:
071: /**
072: * This operation sets an application variable. If a variable does not exist with
073: * the same name, its an error.
074: *
075: * @param name - name of the application variable
076: * @param appVar - this is the application variable compoiste to be updated.
077: * @throws MBeanException if one or more application variables cannot be deleted
078: * @return management message string which gives the status of the operation. For
079: * target=cluster, instance specific details are included.
080: */
081: public void setApplicationVariable(String name, CompositeData appVar)
082: throws MBeanException;
083:
084: /**
085: * This operation deletes an application variable, if a variable with the specified name does
086: * not exist, it's an error.
087: *
088: * @param name - name of the application variable
089: * @throws MBeanException on errors.
090: * @return management message string which gives the status of the operation. For
091: * target=cluster, instance specific details are included.
092: */
093: public void deleteApplicationVariable(String name)
094: throws MBeanException;
095:
096: /**
097: * Get the Application Variable set for a component.
098: *
099: * @return a TabularData which has all the applicationvariables set on the component.
100: */
101: public TabularData getApplicationVariables();
102:
103: /**
104: * Get the CompositeType definition for the components application configuration
105: *
106: * @return the CompositeType for the components application configuration.
107: */
108: public CompositeType queryApplicationConfigurationType();
109:
110: /**
111: * Add an application configuration. The configuration name is a part of the CompositeData.
112: * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
113: *
114: * @param name - configuration name, must match the value of the field "name" in the namedConfig
115: * @param appConfig - application configuration composite
116: * @throws MBeanException if the application configuration cannot be added.
117: * @return management message string which gives the status of the operation. For
118: * target=cluster, instance specific details are included.
119: */
120: public void addApplicationConfiguration(String name,
121: CompositeData appConfig) throws MBeanException;
122:
123: /**
124: * Delete an application configuration.
125: *
126: * @param name - identification of the application configuration to be deleted
127: * @throws MBeanException if the configuration cannot be deleted.
128: * @return management message string which gives the status of the operation. For
129: * target=cluster, instance specific details are included.
130: */
131: public void deleteApplicationConfiguration(String name)
132: throws MBeanException;
133:
134: /**
135: * Update a application configuration. The configuration name is a part of the CompositeData.
136: * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
137: *
138: * @param name - configuration name, must match the value of the field "configurationName" in the appConfig
139: * @param appConfig - application configuration composite
140: * @throws MBeanException if there are errors encountered when updating the configuration.
141: * @return management message string which gives the status of the operation. For
142: * target=cluster, instance specific details are included.
143: */
144: public void setApplicationConfiguration(String name,
145: CompositeData appConfig) throws MBeanException;
146:
147: /**
148: * Get a Map of all application configurations for the component.
149: *
150: * @return a TabularData of all the application configurations for a
151: * component keyed by the configuration name.
152: */
153: public TabularData getApplicationConfigurations();
154: }
|