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 protected
AsyncAnnotatedMBean(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 Object
asyncInvole(String s, Object[] objects, String[] strings)
Object
invoke(String s, Object[] objects, String[] strings)
static ObjectInstance
registerMBean(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:
MBeanException
ReflectionException
-
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:
invoke
in interfaceDynamicMBean
- Overrides:
invoke
in classAnnotatedMBean
- Throws:
MBeanException
ReflectionException
-
-