01: /*
02: * Copyright 2002-2005 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.assembler;
18:
19: import javax.management.JMException;
20: import javax.management.modelmbean.ModelMBeanInfo;
21:
22: /**
23: * Interface to be implemented by all classes that can
24: * create management interface metadata for a managed resource.
25: *
26: * <p>Used by the <code>MBeanExporter</code> to generate the management
27: * interface for any bean that is not an MBean.
28: *
29: * @author Rob Harrop
30: * @author Juergen Hoeller
31: * @since 1.2
32: * @see org.springframework.jmx.export.MBeanExporter
33: */
34: public interface MBeanInfoAssembler {
35:
36: /**
37: * Create the ModelMBeanInfo for the given managed resource.
38: * @param managedBean the bean that will be exposed (might be an AOP proxy)
39: * @param beanKey the key associated with the managed bean
40: * @return the ModelMBeanInfo metadata object
41: * @throws JMException in case of errors
42: */
43: ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey)
44: throws JMException;
45:
46: }
|