Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.mx.util
Class MBeanTyper

    java.lang.Object
      org.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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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