Inherits java::util::TimerTask.
Public Member Functions | |
PingTimerTask (ManagerImpl manager, Logger logger, ClientInfo clientInfo, ACSAlarmSystemInterface alarmSource) | |
void | run () |
String | toString () |
void | raise_alarm (String faultMember) |
void | clear_alarm (String faultMember) |
void | send_alarm (String faultMember, String state) |
Static Protected Attributes | |
static final String | FAULT_FAMILY = "Manager" |
static final int | FAULT_CODE = 1 |
Implementation of ping task executed by java.util.Timer</class>.
Manager pings its clients (both GUI clients, as well as Containers) repeatedly to verify that they still exist. The return value of
Client.ping()
can be either "true", indicating that everything is OK with the client, or "false", indicating that client is malfunctioning.
If
RemoteTransientException
or RemoteTimeoutException
exception is thrown, the Manager should retry the ping several times, and only then shall the client be assumed to be malfunctioning. If another exception is thrown, the client may be immediately assumed to be malfunctioning. Once the client is found to be malfunctioning, the Manager makes an implicit logout of the client.
com.cosylab.acs.maci.manager.PingTimerTask.PingTimerTask | ( | ManagerImpl | manager, | |
Logger | logger, | |||
ClientInfo | clientInfo, | |||
ACSAlarmSystemInterface | alarmSource | |||
) |
Constructs a ping task which monitors client's state.
manager | manager to which the client is logged in | |
logger | logger. | |
clientInfo | info of the client to be monitored | |
alarmSource | interface to send alarms | |
activeAlarm | set of active alarms |
void com.cosylab.acs.maci.manager.PingTimerTask.clear_alarm | ( | String | faultMember | ) |
Clear alarm.
faultMember |
References com.cosylab.acs.maci.ClientInfo.getName(), com.cosylab.acs.maci.manager.ManagerImpl.hasActiveAlarm(), and com.cosylab.acs.maci.manager.PingTimerTask.send_alarm().
Referenced by com.cosylab.acs.maci.manager.PingTimerTask.run().
void com.cosylab.acs.maci.manager.PingTimerTask.raise_alarm | ( | String | faultMember | ) |
Raise alarm.
faultMember |
References com.cosylab.acs.maci.ClientInfo.getName(), com.cosylab.acs.maci.manager.ManagerImpl.hasActiveAlarm(), and com.cosylab.acs.maci.manager.PingTimerTask.send_alarm().
Referenced by com.cosylab.acs.maci.manager.PingTimerTask.run().
void com.cosylab.acs.maci.manager.PingTimerTask.run | ( | ) |
References com.cosylab.acs.maci.manager.PingTimerTask.clear_alarm(), com.cosylab.acs.maci.ClientInfo.getClient(), com.cosylab.acs.maci.ClientInfo.getHandle(), com.cosylab.acs.maci.ClientInfo.getName(), com.cosylab.acs.maci.Client.ping(), and com.cosylab.acs.maci.manager.PingTimerTask.raise_alarm().
void com.cosylab.acs.maci.manager.PingTimerTask.send_alarm | ( | String | faultMember, | |
String | state | |||
) |
Convenience method for send_alarm with given state.
faultMember | ||
state |
References com.cosylab.acs.maci.manager.ManagerImpl.alarmCleared(), com.cosylab.acs.maci.manager.ManagerImpl.alarmRaised(), com.cosylab.acs.maci.manager.PingTimerTask.FAULT_CODE, com.cosylab.acs.maci.manager.PingTimerTask.FAULT_FAMILY, alma.alarmsystem.source.ACSAlarmSystemInterface.push(), alma.alarmsystem.source.ACSFaultState.setDescriptor(), and alma.alarmsystem.source.ACSFaultState.setUserTimestamp().
Referenced by com.cosylab.acs.maci.manager.PingTimerTask.clear_alarm(), and com.cosylab.acs.maci.manager.PingTimerTask.raise_alarm().
String com.cosylab.acs.maci.manager.PingTimerTask.toString | ( | ) |
Returns a single-line rendition of this instance into text.
final int com.cosylab.acs.maci.manager.PingTimerTask.FAULT_CODE = 1 [static, protected] |
Referenced by com.cosylab.acs.maci.manager.PingTimerTask.send_alarm().
final String com.cosylab.acs.maci.manager.PingTimerTask.FAULT_FAMILY = "Manager" [static, protected] |
Referenced by com.cosylab.acs.maci.manager.PingTimerTask.send_alarm().