Package org.apache.activemq.broker.jmx
Class AsyncAnnotatedMBean
- java.lang.Object
-
- javax.management.StandardMBean
-
- org.apache.activemq.broker.jmx.AnnotatedMBean
-
- org.apache.activemq.broker.jmx.AsyncAnnotatedMBean
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration
public class AsyncAnnotatedMBean extends AnnotatedMBean
MBean that invokes the requested operation using an async operation and waits for the result if the operation times out then an exception is thrown.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAsyncAnnotatedMBean(Class<?> mbeanInterface, ObjectName objectName)AsyncAnnotatedMBean(ExecutorService executor, long timeout, T impl, Class<T> mbeanInterface, ObjectName objectName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectasyncInvole(String s, Object[] objects, String[] strings)Objectinvoke(String s, Object[] objects, String[] strings)static ObjectInstanceregisterMBean(ExecutorService executor, long timeout, ManagementContext context, Object object, ObjectName objectName)-
Methods inherited from class org.apache.activemq.broker.jmx.AnnotatedMBean
getDescription, getDescription, getParameterName, registerMBean
-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Constructor Detail
-
AsyncAnnotatedMBean
public AsyncAnnotatedMBean(ExecutorService executor, long timeout, T impl, Class<T> mbeanInterface, ObjectName objectName) throws NotCompliantMBeanException
- Throws:
NotCompliantMBeanException
-
AsyncAnnotatedMBean
protected AsyncAnnotatedMBean(Class<?> mbeanInterface, ObjectName objectName) throws NotCompliantMBeanException
- Throws:
NotCompliantMBeanException
-
-
Method Detail
-
asyncInvole
protected Object asyncInvole(String s, Object[] objects, String[] strings) throws MBeanException, ReflectionException
- Throws:
MBeanExceptionReflectionException
-
registerMBean
public static ObjectInstance registerMBean(ExecutorService executor, long timeout, ManagementContext context, Object object, ObjectName objectName) throws Exception
- Throws:
Exception
-
invoke
public Object invoke(String s, Object[] objects, String[] strings) throws MBeanException, ReflectionException
- Specified by:
invokein interfaceDynamicMBean- Overrides:
invokein classAnnotatedMBean- Throws:
MBeanExceptionReflectionException
-
-