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: * @(#)ComponentInfo.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.management;
030:
031: import java.util.Properties;
032:
033: /**
034: * This ComponentInfo extends the base com.sun.jbi.ComponentInfo to
035: * provide access to the persisted component configuration, variables and named
036: * configuration
037: *
038: * @author Sun Microsystems, Inc.
039: */
040: public interface ComponentInfo extends com.sun.jbi.ComponentInfo {
041: /**
042: * Application Variables.
043: */
044: public class Variable {
045: /** name, value and type */
046: private String mName;
047: private String mValue;
048: private String mType;
049:
050: public Variable(String name, String value, String type) {
051: mName = name;
052: mType = type;
053: mValue = value;
054: }
055:
056: /**
057: * @return the name
058: */
059: public String getName() {
060: return mName;
061: }
062:
063: /**
064: * @return the value
065: */
066: public String getValue() {
067: return mValue;
068: }
069:
070: /**
071: * @return the type
072: */
073: public String getType() {
074: return mType;
075: }
076:
077: /**
078: * @return truw if this variable is equal to the one being compared with.
079: */
080: public boolean equals(Variable var) {
081: return (var.getName().equals(mName)
082: && var.getValue().equals(mValue) && var.getType()
083: .equals(mType));
084: }
085:
086: }
087:
088: /**
089: * Get the Application Variables
090: *
091: * @return an array of Variables set on the component. If there are zero
092: * environment variables et on the component an empty array is returned.
093: */
094: public Variable[] getVariables();
095:
096: /**
097: * Get the static component configuration.
098: *
099: * @return the components constant configuration.
100: */
101: public Properties getConfiguration();
102:
103: /**
104: * Get a specific application configuration.
105: *
106: * @return the application configuration whose name = configName. If one does not exist
107: * an empty properties object is returned.
108: */
109: public Properties getApplicationConfiguration(String name);
110:
111: /**
112: * Get the names of all application configurations set on the component.
113: *
114: * @return a list of names of all application configurations. If there are zero
115: * application configurations set on the component an empty array is returned.
116: */
117: public String[] getApplicationConfigurationNames();
118:
119: }
|