A subsystem monitor is an object that monitors the health of a remote system. It uses an event source to inform all registered listeners of the health of the system.
Advanced Java 2 Platform Enterprise Edition (J2EE) applications often rely on remote, non-managed, non-J2EE systems. These remote systems can periodically send clients a message to indicate that they are working. A subsystem monitor is essentially a set of alarms that track indicators messages or heartbeats from a remote system.
An application creates a subsystem monitor by calling the SubsystemMonitorManager.create() method with the following parameters:
Make the Missed heart beats until dead value greater or equal to the Missed heart beats until stale value. If Missed heart beats until stale value equals the Missed heart beats until dead value, then a stale event is not published. Only a dead event is published.
Applications wanting to be informed of these events can register a listener that implements the SubsystemMonitorEvents interface. For more information on the SybsystemMonitorEvents interface, see the Javadoc .
Heart beat messages can be transmitted using a variety of mechanisms. The application must call the SubsystemMonitor ping() method whenever a heartbeat message arrives from a remote system, but the method used to detect these messages is up to the application. For example, you might use a Java Message Service (JMS) publish or subscribe implementation or even a third-party Java messaging product that does not implement JMS.