001: /**
002: * Copyright 2004-2005 jManage.org
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */package org.jmanage.core.services;
016:
017: import org.jmanage.core.management.*;
018: import org.jmanage.core.data.OperationResultData;
019: import org.jmanage.core.data.AttributeListData;
020:
021: import java.util.List;
022: import java.util.Map;
023:
024: /**
025: *
026: * date: Feb 21, 2005
027: * @author Rakesh Kalra
028: * @author Shashank Bellary
029: */
030: public interface MBeanService {
031:
032: public List queryMBeans(ServiceContext context, String filter)
033: throws ServiceException;
034:
035: /**
036: * if datatypes is null then Map will contain all the MBeans
037: * if datatype is not null then only Mbeans thats have attributes of matching
038: * data types will be returned
039: * @param context
040: * @param filter
041: * @param dataTypes
042: * @return
043: */
044: public Map queryMBeansOutputMap(ServiceContext context,
045: String filter, String[] dataTypes, String applyAttribFilter);
046:
047: /**
048: * Gets the MBean information.
049: *
050: * @param context instance of ServiceContext
051: * @return instance of ObjectInfo
052: * @throws ServiceException
053: */
054: public ObjectInfo getMBeanInfo(ServiceContext context)
055: throws ServiceException;
056:
057: /**
058: * @return list of all attribute values
059: */
060: public AttributeListData[] getAttributes(ServiceContext context)
061: throws ServiceException;
062:
063: public AttributeListData[] getAttributes(ServiceContext context,
064: String[] attributes, boolean handleCluster)
065: throws ServiceException;
066:
067: public List filterAttributes(ServiceContext context,
068: ObjectName objectName, ObjectAttributeInfo[] objAttrInfo,
069: String[] dataTypes) throws ServiceException;
070:
071: public ObjectAttribute getObjectAttribute(ServiceContext context,
072: String attribute) throws ServiceException;
073:
074: /**
075: * Invokes MBean operation
076: * @return
077: * @throws ServiceException
078: */
079: public OperationResultData[] invoke(ServiceContext context,
080: String operationName, String[] params)
081: throws ServiceException;
082:
083: /**
084: * Invokes MBean operation
085: * @return
086: * @throws ServiceException
087: */
088: public OperationResultData[] invoke(ServiceContext context,
089: String operationName, String[] params, String[] signature)
090: throws ServiceException;
091:
092: public AttributeListData[] setAttributes(ServiceContext context,
093: String[][] attributes) throws ServiceException;
094:
095: /**
096: * Updates MBean attributes at a stand alone application level or at a
097: * cluster level.
098: *
099: * @param context
100: * @param attributes
101: * @throws ServiceException
102: */
103: public AttributeListData[] setAttributes(ServiceContext context,
104: Map attributes) throws ServiceException;
105:
106: public Map queryMBeansWithNotifications(ServiceContext context)
107: throws ServiceException;
108:
109: /**
110: * returns data type of an attribute
111: * @param context
112: * @param attributeName
113: * @param objectName
114: * @return
115: * @throws ServiceException
116: */
117: public String getAttributeDataType(ServiceContext context,
118: String attributeName, String objectName)
119: throws ServiceException;
120:
121: public ObjectOperationInfo getOperationInfo(ServiceContext context,
122: String operationName, String[] signature)
123: throws ServiceException;
124: }
|