org.jboss.mx.util
Class MBeanTyper
java.lang.Object
org.jboss.mx.util.MBeanTyper
- public class MBeanTyper
- extends java.lang.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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MBeanTyper
public MBeanTyper()
typeMBean
public static final java.lang.Object typeMBean(MBeanServer (src) server,
ObjectName (src) mbean,
java.lang.Class mainInterface)
throws java.lang.Exception
- create a typed object from an mbean
- Throws:
java.lang.Exception