|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SubsystemMonitor
This represents a subsystem monitor. This is returned to allow an application to interact with the monitor created on its behalf. This is an EventSource so an application can register a listener to it.
A subsystem monitor basically is a set of alarms. When it is created, the applications tells it how often heart beats should be expected, how man beats missed means that it's stale and how many beats missed means it's dead. The monitor then sets up alarms to track this status. If the ping method is called then these alarms are reset. If the alarm fires then this means that ping hasn't been called, i.e. no heart beat was received by the application for the subsystem this monitor is 'watching'.
When the number of beats for stale has elapsed without a ping then we fire a stale event. Later, if the number of beats for dead elapse without a ping then we fire a dead event. If a ping is received after a stale or dead notification then we send a fresh event indicating the subsystem is alive again and carry on as normal.
If the stale beats equals the dead beats then no stale event is published, we just publish a dead event. The number of dead beats should always be greater or equal to the number of stale beats. What constitutes a ping is application specific. A destroy notification is also published.
This can generate events. The events which can be generated are documented in the SubsystemMonitorEvents interface. Implement the Events interface and add an instance of this object using the SubsystemMonitor.addListener method.
SubsystemMonitorManager
,
SubsystemMonitorEvents
Field Summary | |
---|---|
static int |
SUBSYSTEM_DEAD
|
static int |
SUBSYSTEM_FRESH
|
static int |
SUBSYSTEM_INVALID
|
static int |
SUBSYSTEM_STALE
|
Fields inherited from interface com.ibm.websphere.asynchbeans.EventSource |
---|
APPLICATION_NOTIFICATION_EVENT_SOURCE, MAX_LISTENER_SEQUENCE_VALUE, MIN_LISTENER_SEQUENCE_VALUE |
Method Summary | |
---|---|
void |
destroy()
Kill the monitor. |
int |
getCurrentState()
This returns the last notification sent by the subsystem monitor. |
int |
getHeartBeatInterval()
The interval in milliseconds between expected heart beats. |
int |
getMissedBeatsForDead()
The number of missed beats for the subsystem to be regarded as dead. |
int |
getMissedBeatsForStale()
The number of missed beats for the subsystem to be regarded as stale. |
java.lang.String |
getName()
The name of the monitor. |
java.util.Map |
getPropertyMap()
This returns the Map holding the properties for the subsystem monitor. |
void |
ping()
You must call this periodically to keep the monitor alive. |
void |
start()
The monitor only becomes active, that is starts tracking heart beats when it is started. |
Methods inherited from interface com.ibm.websphere.asynchbeans.EventSource |
---|
addListener, addListener, getEventTrigger, getEventTrigger, removeListener |
Field Detail |
---|
static final int SUBSYSTEM_DEAD
static final int SUBSYSTEM_FRESH
static final int SUBSYSTEM_STALE
static final int SUBSYSTEM_INVALID
Method Detail |
---|
java.util.Map getPropertyMap()
java.lang.String getName()
int getMissedBeatsForStale()
int getMissedBeatsForDead()
int getHeartBeatInterval()
void ping()
void start()
void destroy()
int getCurrentState()
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |