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
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
ConstructorsModifierConstructorDescriptionprotectedAsyncAnnotatedMBean(Class<?> mbeanInterface, ObjectName objectName) AsyncAnnotatedMBean(ExecutorService executor, long timeout, T impl, Class<T> mbeanInterface, ObjectName objectName) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectasyncInvole(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, registerMBeanMethods 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 Details
-
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 Details
-
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
-