KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > management > MBeanRegistry


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

15 package org.apache.hivemind.management;
16
17 import javax.management.InstanceAlreadyExistsException JavaDoc;
18 import javax.management.InstanceNotFoundException JavaDoc;
19 import javax.management.JMException JavaDoc;
20 import javax.management.MBeanRegistrationException JavaDoc;
21 import javax.management.NotCompliantMBeanException JavaDoc;
22 import javax.management.ObjectInstance JavaDoc;
23 import javax.management.ObjectName JavaDoc;
24
25 /**
26  * Service that registers MBeans in the an MBeanServer.
27  *
28  * @author Achim Huegen
29  * @since 1.1
30  */

31 public interface MBeanRegistry
32 {
33     /**
34      * Registers a MBean in the MBeanServer
35      *
36      * @param obj
37      * the MBean
38      * @param managementInterface
39      * The ManagementInterface if obj is a Standard MBean Can be null, if obj implements
40      * DynamicMBean
41      * @param objectname
42      * ObjectName of the MBean
43      * @throws JMException
44      * If JMX calls fail
45      */

46     public abstract ObjectInstance JavaDoc registerMBean(Object JavaDoc obj, Class JavaDoc managementInterface,
47             ObjectName JavaDoc objectname) throws InstanceAlreadyExistsException JavaDoc,
48             MBeanRegistrationException JavaDoc, NotCompliantMBeanException JavaDoc;
49
50     /**
51      * Unregisters a MBean from the MBeanServer
52      *
53      * @param objectname
54      * ObjectName of the MBean
55      * @throws InstanceNotFoundException
56      * @throws MBeanRegistrationException
57      */

58     public abstract void unregisterMBean(ObjectName JavaDoc objectname) throws InstanceNotFoundException JavaDoc,
59             MBeanRegistrationException JavaDoc;
60 }
Popular Tags