站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

MBeanTyper (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


org.jboss.mx.util
Class MBeanTyper

java.lang.Object
  extended byorg.jboss.mx.util.MBeanTyper

public class MBeanTyper
extends Object

MBeanTyper is a helper class that creates a typed-object from an MBean ObjectName and a main interface class that the MBean implements. You can then use the returned object (casted to the appropriate main interface class) with the correct typed signatures instead of mbeanserver.invoke(objectname,,etc.).

Example usage:
MyInterfaceMBean mbean=(MyInterfaceMBean)MBeanTyper.typeMBean(server,new ObjectName(":type=MyBean"),MyInterfaceMBean.class); mbean.foobar();

To turn debug on for this package, set the System property vocalos.jmx.mbeantyper.debug to true.

Author:
Jeff Haynie

Constructor Summary
MBeanTyper()
           
 
Method Summary
static Object typeMBean(MBeanServer server, ObjectName mbean, Class mainInterface)
          create a typed object from an mbean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanTyper

public MBeanTyper()
Method Detail

typeMBean

public static final Object typeMBean(MBeanServer server,
                                     ObjectName mbean,
                                     Class mainInterface)
                              throws Exception
create a typed object from an mbean

Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.