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 test;
030:
031: import com.sun.jbi.util.ComponentConfigurationHelper;
032:
033: import javax.management.MBeanException;
034: import javax.management.openmbean.CompositeData;
035: import javax.management.openmbean.CompositeType;
036: import javax.management.openmbean.TabularData;
037: import javax.management.openmbean.TabularType;
038:
039: public interface CustomConfigMBean {
040: /**
041: * Test method.
042: */
043: public String getComponentCustomInfo();
044:
045: /**
046: * HostName gettter/setter
047: */
048: public void setHostName(String hostName);
049:
050: public String getHostName();
051:
052: /**
053: * Port get/set
054: */
055: public void setPort(int port);
056:
057: public int getPort();
058:
059: /**
060: * Get the CompositeType definition for the components application configuration
061: *
062: * @return the CompositeType for the components application configuration.
063: */
064: public CompositeType queryApplicationConfigurationType();
065:
066: /**
067: * Add an application configuration. The configuration name is a part of the CompositeData.
068: * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
069: *
070: * @param name - configuration name, must match the value of the field "name" in the namedConfig
071: * @param appConfig - application configuration composite
072: * @throws MBeanException if the application configuration cannot be added.
073: * @return management message string which gives the status of the operation. For
074: * target=cluster, instance specific details are included.
075: */
076: public void addApplicationConfiguration(String name,
077: CompositeData appConfig) throws MBeanException;
078:
079: /**
080: * Delete an application configuration.
081: *
082: * @param name - identification of the application configuration to be deleted
083: * @throws MBeanException if the configuration cannot be deleted.
084: * @return management message string which gives the status of the operation. For
085: * target=cluster, instance specific details are included.
086: */
087: public void deleteApplicationConfiguration(String name)
088: throws MBeanException;
089:
090: /**
091: * Update a application configuration. The configuration name is a part of the CompositeData.
092: * The itemName for the configuration name is "configurationName" and the type is SimpleType.STRING
093: *
094: * @param name - configuration name, must match the value of the field "configurationName" in the appConfig
095: * @param appConfig - application configuration composite
096: * @throws MBeanException if there are errors encountered when updating the configuration.
097: * @return management message string which gives the status of the operation. For
098: * target=cluster, instance specific details are included.
099: */
100: public void setApplicationConfiguration(String name,
101: CompositeData appConfig) throws MBeanException;
102:
103: /**
104: * Get a Map of all application configurations for the component.
105: *
106: * @return a TabularData of all the application configurations for a
107: * component keyed by the configuration name.
108: */
109: public TabularData getApplicationConfigurations();
110:
111: /**
112: * This operation adds a new application variable. If a variable already exists with
113: * the same name as that specified then the operation fails.
114: *
115: * @param name - name of the application variable
116: * @param appVar - this is the application variable compoiste
117: * @throws MBeanException if an error occurs in adding the application variables to the
118: * component.
119: * @return management message string which gives the status of the operation. For
120: * target=cluster, instance specific details are included.
121: */
122: public void addApplicationVariable(String name, CompositeData appVar)
123: throws MBeanException;
124:
125: /**
126: * This operation sets an application variable. If a variable does not exist with
127: * the same name, its an error.
128: *
129: * @param name - name of the application variable
130: * @param appVar - this is the application variable compoiste to be updated.
131: * @throws MBeanException if one or more application variables cannot be deleted
132: * @return management message string which gives the status of the operation. For
133: * target=cluster, instance specific details are included.
134: */
135: public void setApplicationVariable(String name, CompositeData appVar)
136: throws MBeanException;
137:
138: /**
139: * This operation deletes an application variable, if a variable with the specified name does
140: * not exist, it's an error.
141: *
142: * @param name - name of the application variable
143: * @throws MBeanException on errors.
144: * @return management message string which gives the status of the operation. For
145: * target=cluster, instance specific details are included.
146: */
147: public void deleteApplicationVariable(String name)
148: throws MBeanException;
149:
150: /**
151: * Get the Application Variable set for a component.
152: *
153: * @return a TabularData which has all the applicationvariables set on the component.
154: */
155: public TabularData getApplicationVariables();
156: }
|