KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > jmx > export > naming > ObjectNamingStrategy


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.naming;
18
19 import javax.management.MalformedObjectNameException JavaDoc;
20 import javax.management.ObjectName JavaDoc;
21
22 /**
23  * Strategy interface that encapsulates the creation of <code>ObjectName</code> instances.
24  *
25  * <p>Used by the <code>MBeanExporter</code> to obtain <code>ObjectName</code>s
26  * when registering beans.
27  *
28  * @author Rob Harrop
29  * @since 1.2
30  * @see org.springframework.jmx.export.MBeanExporter
31  * @see javax.management.ObjectName
32  */

33 public interface ObjectNamingStrategy {
34
35     /**
36      * Obtain an <code>ObjectName</code> for the supplied bean.
37      * @param managedBean the bean that will be exposed under the
38      * returned <code>ObjectName</code>
39      * @param beanKey the key associated with this bean in the beans map
40      * passed to the <code>MBeanExporter</code>
41      * @return the <code>ObjectName</code> instance
42      * @throws MalformedObjectNameException if the resulting <code>ObjectName</code> is invalid
43      */

44     ObjectName JavaDoc getObjectName(Object JavaDoc managedBean, String JavaDoc beanKey) throws MalformedObjectNameException JavaDoc;
45
46 }
47
Popular Tags