public class BCELMBeanInvoker extends CachingReflectionMBeanInvoker
public interface ServiceMBean { public void start(); public Collection getServices(ServiceSelector selector); } public class BCELMBeanInvokerGenerated extends BCELMBeanInvoker { protected Object invokeImpl(MBeanMetaData metadata, String method, String[] signature, Object[] args) throws Throwable { if (method.equals("start") && args.length == 0) { try { ((ServiceMBean)metadata.mbean).start(); return null; } catch (ClassCastException x) {} catch (IllegalAccessError x) {} } else if (method.equals("getServices") && args.length == 1) { try { return ((ServiceMBean)metadata.mbean).getServices((ServiceSelector)args[0]); } catch (ClassCastException x) {} catch (IllegalAccessError x) {} } return super.invokeImpl(metadata, method, signature, args); } }
EMPTY_ARGS, EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
BCELMBeanInvoker() |
Modifier and Type | Method and Description |
---|---|
static MBeanInvoker |
create(MBeanMetaData metadata)
Creates a new MBeanInvoker created on-the-fly by using BCEL.
|
protected java.lang.Object |
invokeImpl(MBeanMetaData metadata,
java.lang.String method,
java.lang.String[] signature,
java.lang.Object[] args)
Performs the actual invocation of the MBean's method.
|
getMethodForAttribute, getStandardAttributeInfo, getStandardManagementMethod, getStandardOperationInfo
doInvoke, getAttribute, invoke, setAttribute
public static MBeanInvoker create(MBeanMetaData metadata)
protected java.lang.Object invokeImpl(MBeanMetaData metadata, java.lang.String method, java.lang.String[] signature, java.lang.Object[] args) throws java.lang.Throwable
ReflectionMBeanInvoker
ReflectionMBeanInvoker.doInvoke(mx4j.server.MBeanMetaData, java.lang.String, java.lang.String[], java.lang.Object[])
takes care of converting them to JMX exceptions.invokeImpl
in class ReflectionMBeanInvoker
java.lang.Throwable