|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmx4j.util.StandardMBeanProxy
MBeanServerInvocationHandler
A utility class that creates proxies for invocation on standard MBeans (does not work for DynamicMBeans) on local MBeanServers.
Usage example:
public interface MyServiceMBean {...} public class MyService implements MyServiceMBean {...} pulic class Main { public static void main(String[] args) throws Exception { MBeanServer server = ...; ObjectName myServiceObjectName = ...; MyServiceMBean mbean = (MyServiceMBean)StandardMBeanProxy.create(MyServiceMBean.class, server, myServiceObjectName); ... } }
Nested Class Summary | |
protected static class |
StandardMBeanProxy.Handler
Deprecated. Base class for MBeanServer invocation handlers. |
Constructor Summary | |
StandardMBeanProxy()
Deprecated. |
Method Summary | |
static java.lang.Object |
create(java.lang.Class mbeanInterface,
javax.management.MBeanServer server,
javax.management.ObjectName name)
Deprecated. Creates a proxy with the given MBean interface for an MBean with the specified ObjectName living in the specified local MBeanServer. |
static java.lang.Object |
create(java.lang.Class mbeanInterface,
javax.management.ObjectName name)
Deprecated. Replaced by create(Class mbeanInterface, MBeanServer server, ObjectName name) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardMBeanProxy()
Method Detail |
public static java.lang.Object create(java.lang.Class mbeanInterface, javax.management.ObjectName name)
create(Class mbeanInterface, MBeanServer server, ObjectName name)
MBeanServerFactory.findMBeanServer(null).get(0)
.
public static java.lang.Object create(java.lang.Class mbeanInterface, javax.management.MBeanServer server, javax.management.ObjectName name)
UndeclaredThrowableException
being thrown. MBeanServer's behavior would be to throw an InstanceNotFoundException, but this exception
is normally not declared in the throws clause of MBean's management interface, thus resulting
in the UndeclaredThrowableException being thrown instead.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |