public class PingTimerTask
extends java.util.TimerTask
java.util.Timer.
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.| Modifier and Type | Field and Description |
|---|---|
protected static int |
FAULT_CODE |
protected static java.lang.String |
FAULT_FAMILY |
| Constructor and Description |
|---|
PingTimerTask(ManagerImpl manager,
java.util.logging.Logger logger,
ClientInfo clientInfo,
AlarmSource alarmSource)
Constructs a ping task which monitors client's state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
java.lang.String |
toString()
Returns a single-line rendition of this instance into text.
|
protected static final java.lang.String FAULT_FAMILY
protected static final int FAULT_CODE
public PingTimerTask(ManagerImpl manager, java.util.logging.Logger logger, ClientInfo clientInfo, AlarmSource alarmSource)
manager - manager to which the client is logged inlogger - logger.clientInfo - info of the client to be monitoredalarmSource - interface to send alarmsactiveAlarm - set of active alarmspublic void run()
run in interface java.lang.Runnablerun in class java.util.TimerTaskRunnable.run()public java.lang.String toString()
toString in class java.lang.Object