001/* 002 * Copyright 2002-2012 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.jmx.export.assembler; 018 019import javax.management.JMException; 020import javax.management.modelmbean.ModelMBeanInfo; 021 022/** 023 * Interface to be implemented by all classes that can 024 * create management interface metadata for a managed resource. 025 * 026 * <p>Used by the {@code MBeanExporter} to generate the management 027 * interface for any bean that is not an MBean. 028 * 029 * @author Rob Harrop 030 * @author Juergen Hoeller 031 * @since 1.2 032 * @see org.springframework.jmx.export.MBeanExporter 033 */ 034public interface MBeanInfoAssembler { 035 036 /** 037 * Create the ModelMBeanInfo for the given managed resource. 038 * @param managedBean the bean that will be exposed (might be an AOP proxy) 039 * @param beanKey the key associated with the managed bean 040 * @return the ModelMBeanInfo metadata object 041 * @throws JMException in case of errors 042 */ 043 ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException; 044 045}