KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > core > services > MBeanService


1 /**
2  * Copyright 2004-2005 jManage.org
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.jmanage.core.services;
17
18 import org.jmanage.core.management.*;
19 import org.jmanage.core.data.OperationResultData;
20 import org.jmanage.core.data.AttributeListData;
21
22 import java.util.List JavaDoc;
23 import java.util.Map JavaDoc;
24
25 /**
26  *
27  * date: Feb 21, 2005
28  * @author Rakesh Kalra
29  * @author Shashank Bellary
30  */

31 public interface MBeanService {
32
33     public List JavaDoc queryMBeans(ServiceContext context,
34                           String JavaDoc filter)
35             throws ServiceException;
36
37     /**
38      * if datatypes is null then Map will contain all the MBeans
39      * if datatype is not null then only Mbeans thats have attributes of matching
40      * data types will be returned
41      * @param context
42      * @param filter
43      * @param dataTypes
44      * @return
45      */

46     public Map JavaDoc queryMBeansOutputMap(ServiceContext context, String JavaDoc filter,
47                                     String JavaDoc[] dataTypes, String JavaDoc applyAttribFilter);
48
49     /**
50      * Gets the MBean information.
51      *
52      * @param context instance of ServiceContext
53      * @return instance of ObjectInfo
54      * @throws ServiceException
55      */

56     public ObjectInfo getMBeanInfo(ServiceContext context)
57             throws ServiceException;
58
59     /**
60      * @return list of all attribute values
61      */

62     public AttributeListData[] getAttributes(ServiceContext context)
63             throws ServiceException;
64
65     public AttributeListData[] getAttributes(ServiceContext context,
66                                              String JavaDoc[] attributes,
67                                              boolean handleCluster)
68             throws ServiceException;
69
70     public List JavaDoc filterAttributes(ServiceContext context,
71                                  ObjectName objectName,
72                                  ObjectAttributeInfo[] objAttrInfo,
73                                  String JavaDoc[] dataTypes)
74             throws ServiceException;
75
76     public ObjectAttribute getObjectAttribute(ServiceContext context,
77                                               String JavaDoc attribute)
78             throws ServiceException;
79
80     /**
81      * Invokes MBean operation
82      * @return
83      * @throws ServiceException
84      */

85     public OperationResultData[] invoke(ServiceContext context,
86                                         String JavaDoc operationName,
87                                         String JavaDoc[] params)
88             throws ServiceException;
89
90     /**
91      * Invokes MBean operation
92      * @return
93      * @throws ServiceException
94      */

95     public OperationResultData[] invoke(ServiceContext context,
96                                         String JavaDoc operationName,
97                                         String JavaDoc[] params,
98                                         String JavaDoc[] signature)
99         throws ServiceException;
100
101
102     public AttributeListData[] setAttributes(ServiceContext context,
103                                              String JavaDoc[][] attributes)
104             throws ServiceException;
105
106     /**
107      * Updates MBean attributes at a stand alone application level or at a
108      * cluster level.
109      *
110      * @param context
111      * @param attributes
112      * @throws ServiceException
113      */

114     public AttributeListData[] setAttributes(ServiceContext context,
115                                              Map JavaDoc attributes)
116             throws ServiceException;
117
118     public Map JavaDoc queryMBeansWithNotifications(ServiceContext context)
119             throws ServiceException;
120     /**
121      * returns data type of an attribute
122      * @param context
123      * @param attributeName
124      * @param objectName
125      * @return
126      * @throws ServiceException
127      */

128     public String JavaDoc getAttributeDataType(ServiceContext context,
129                                        String JavaDoc attributeName,
130                                        String JavaDoc objectName)
131             throws ServiceException;
132
133     public ObjectOperationInfo getOperationInfo(ServiceContext context,
134                                        String JavaDoc operationName,
135                                        String JavaDoc[] signature)
136             throws ServiceException;
137 }
138
Popular Tags