| mx4j.examples.mbeans.legacy.DynamicLegacyService
DynamicLegacyService | public class DynamicLegacyService extends AbstractDynamicMBean implements NotificationBroadcaster(Code) | | The wrapper DynamicMBean for exposing the legacy service in a non-invasive way.
This MBean emits notifications when the legacy service starts its activity and when it stops it.
Furthermore, when the legacy service is running, it displays the number of threads that the
legacy service is using to perform its activity.
Note how the
LegacyService is completely unaware of JMX, and even if it has private fields
and methods (the legacy service was designed without knowledge of JMX), it is possible to
expose them (via reflection) in JMX.
This MBean is divided in two parts, the implementation one and the JMX one. Note how the JMX
part, thanks to
AbstractDynamicMBean , is very simple even if it is a DynamicMBean.
version: $Revision: 1.1 $ |
getThreadCount | public int getThreadCount()(Code) | | Returns the number of threads that the legacy service is using to perform its job when it
wakes up.
|
isRunning | public boolean isRunning()(Code) | | Returns whether the legacy service has woken up and it is running or not.
|
|
|