Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::acs::maci::manager::PingTimerTask Class Reference

Collaboration diagram for com::cosylab::acs::maci::manager::PingTimerTask:

Collaboration graph
[legend]
List of all members.

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

final String FAULT_FAMILY = "Manager"
final int FAULT_CODE = 1

Private Member Functions

void logout ()

Private Attributes

int transientCount
ManagerImpl manager
ClientInfo clientInfo
Logger logger
ACSAlarmSystemInterface alarmSource

Static Private Attributes

final int MAX_TRANSIENT_COUNT = 3

Detailed Description

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.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@


Constructor & Destructor Documentation

com::cosylab::acs::maci::manager::PingTimerTask::PingTimerTask ManagerImpl  manager,
Logger  logger,
ClientInfo  clientInfo,
ACSAlarmSystemInterface  alarmSource
[inline]
 

Constructs a ping task which monitors client's state.

Parameters:
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


Member Function Documentation

void com::cosylab::acs::maci::manager::PingTimerTask::clear_alarm String  faultMember  )  [inline]
 

Clear alarm.

Parameters:
faultMember 

void com::cosylab::acs::maci::manager::PingTimerTask::logout  )  [inline, private]
 

Terminates this task and logs the client out.

void com::cosylab::acs::maci::manager::PingTimerTask::raise_alarm String  faultMember  )  [inline]
 

Raise alarm.

Parameters:
faultMember 

void com::cosylab::acs::maci::manager::PingTimerTask::run  )  [inline]
 

See also:
java.lang.Runnable#run()

void com::cosylab::acs::maci::manager::PingTimerTask::send_alarm String  faultMember,
String  state
[inline]
 

Convenience method for send_alarm with given state.

Parameters:
faultMember 
state 

String com::cosylab::acs::maci::manager::PingTimerTask::toString  )  [inline]
 

Returns a single-line rendition of this instance into text.

Returns:
internal state of this instance


Member Data Documentation

ACSAlarmSystemInterface com::cosylab::acs::maci::manager::PingTimerTask::alarmSource [private]
 

Alarm System Interface.

ClientInfo com::cosylab::acs::maci::manager::PingTimerTask::clientInfo [private]
 

Monitored client's info.

final int com::cosylab::acs::maci::manager::PingTimerTask::FAULT_CODE = 1 [static, protected]
 

final String com::cosylab::acs::maci::manager::PingTimerTask::FAULT_FAMILY = "Manager" [static, protected]
 

Logger com::cosylab::acs::maci::manager::PingTimerTask::logger [private]
 

Logger.

ManagerImpl com::cosylab::acs::maci::manager::PingTimerTask::manager [private]
 

Manager to which the client is logged in.

final int com::cosylab::acs::maci::manager::PingTimerTask::MAX_TRANSIENT_COUNT = 3 [static, private]
 

Maximum number of consequential code>RemoteTransientException exception catches logging the client out.

int com::cosylab::acs::maci::manager::PingTimerTask::transientCount [private]
 

Counter for consequential RemoteTransientException exception catches to Client::ping method.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:11:26 2009 for ACS Java API by doxygen 1.3.8