/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.framework.management;

import org.jfox.framework.ComponentContext;
import org.jfox.framework.extra.Managable;
import org.jfox.framework.extra.ManagementInfo;

/**
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class TestManagementComponent implements Managable {

    public String getName() {
        return "TestManagementComponent";
    }

    /**
     * get the Management Method infomation, so can exposed to console
     *
     * @return
     */
    public ManagementInfo getManagementInfo() {
        return ManagementInfo.exposeDeclaring(this.getClass());
    }

    public void setComponentContext(ComponentContext ctx) {
    }

    public static void main(String[] args) throws Exception {
        System.out.println(Managable.class.getMethod("getManagementInfo", null).getDeclaringClass());
        Class clz = TestManagementComponent.class.getMethod("getManagementInfo", null).getDeclaringClass();
        System.out.println(clz);
    }
}

