KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > jmx > export > MBeanExportOperations


1 /*
2  * Copyright 2002-2005 the original author or authors.
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
17 package org.springframework.jmx.export;
18
19 import javax.management.ObjectName JavaDoc;
20
21 /**
22  * Interface that defines the set of MBean export operations that are intended to be
23  * accessed by application developers during application runtime.
24  *
25  * <p>This interface should be used to export application resources to JMX using Spring's
26  * management interface generation capabilties and, optionally, it's {@link ObjectName}
27  * generation capabilities.
28  *
29  * @author Rob Harrop
30  * @since 2.0
31  * @see MBeanExporter
32  */

33 public interface MBeanExportOperations {
34
35     /**
36      * Register the supplied resource with JMX. If the resource is not a valid MBean already,
37      * Spring will generate a management interface for it. The exact interface generated will
38      * depend on the implementation and its configuration. This call also generates an
39      * {@link ObjectName} for the managed resource and returns this to the caller.
40      * @param managedResource the resource to expose via JMX
41      * @return the {@link ObjectName} under which the resource was exposed
42      * @throws MBeanExportException if Spring is unable to generate an {@link ObjectName}
43      * or register the MBean
44      */

45     ObjectName JavaDoc registerManagedResource(Object JavaDoc managedResource) throws MBeanExportException;
46
47     /**
48      * Register the supplied resource with JMX. If the resource is not a valid MBean already,
49      * Spring will generate a management interface for it. The exact interface generated will
50      * depend on the implementation and its configuration.
51      * @param managedResource the resource to expose via JMX
52      * @param objectName the {@link ObjectName} under which to expose the resource
53      * @throws MBeanExportException if Spring is unable to register the MBean
54      */

55     void registerManagedResource(Object JavaDoc managedResource, ObjectName JavaDoc objectName) throws MBeanExportException;
56
57 }
58
Popular Tags