cern::laser::client::impl::services::selection::HeartbeatHelper Class Reference

Inheritance diagram for cern::laser::client::impl::services::selection::HeartbeatHelper:
Inheritance graph
[legend]
Collaboration diagram for cern::laser::client::impl::services::selection::HeartbeatHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HeartbeatHelper (AlarmSelectionListener selectionListener) throws LaserException
void startHeartbeatCheck () throws LaserException
void stopHeartbeatCheck () throws LaserException
void onException (MOMException e)

Private Member Functions

void initHeartbeatCheck () throws LaserException, LaserConnectionException
SubscriptionListener getHeartbeatListener ()
TimerTask createHeartbeatTimerTask ()
void checkHeartbeat ()
synchronized void resetHeartbeatReceptionTime ()
synchronized long getHeartbeatReceptionTime ()
synchronized void setHeartbeatReceived (boolean value)
synchronized boolean isHeartbeatReceived ()
Subscriber getSubscriber () throws LaserException

Private Attributes

SubscriptionListener heartbeatListener = null
AlarmSelectionListener selectionListener = null
Timer timer = null
String heartbeatTopic = null
long heartbeatFrequency = -1
long heartbeatCheckFrequency = -1
boolean heartbeatReceived = false
long heartbeatReceptionTime = -1
Subscriber cmwSubscriber
boolean cmwConnected = true
CERNAlarmService m_laser

Static Private Attributes

static final Logger LOGGER = Logger.getLogger(HeartbeatHelper.class.getName())
static final String HEARTBEAT_PROPERTY = "HEARTBEAT"
static final String SQL_FILTER = "HEARTBEAT = TRUE"

Detailed Description

This class subscribes to the heartbeat from the business layer and verifies that it arrives in time. If it doesn't the AlarmSelectionListener is informed. It is a helper class for the AlarmSelectionHandler.

Version:
Revision
1.6
Date
2009/06/03 16:23:20
Author:
Katarina Sigerud

Constructor & Destructor Documentation

cern::laser::client::impl::services::selection::HeartbeatHelper::HeartbeatHelper ( AlarmSelectionListener  selectionListener  )  throws LaserException [inline]

Member Function Documentation

void cern::laser::client::impl::services::selection::HeartbeatHelper::checkHeartbeat (  )  [inline, private]
TimerTask cern::laser::client::impl::services::selection::HeartbeatHelper::createHeartbeatTimerTask (  )  [inline, private]

References checkHeartbeat(), and LOGGER.

Referenced by startHeartbeatCheck().

SubscriptionListener cern::laser::client::impl::services::selection::HeartbeatHelper::getHeartbeatListener (  )  [inline, private]
synchronized long cern::laser::client::impl::services::selection::HeartbeatHelper::getHeartbeatReceptionTime (  )  [inline, private]

References heartbeatReceptionTime.

Referenced by checkHeartbeat().

Subscriber cern::laser::client::impl::services::selection::HeartbeatHelper::getSubscriber (  )  throws LaserException [inline, private]
void cern::laser::client::impl::services::selection::HeartbeatHelper::initHeartbeatCheck (  )  throws LaserException, LaserConnectionException [inline, private]
synchronized boolean cern::laser::client::impl::services::selection::HeartbeatHelper::isHeartbeatReceived (  )  [inline, private]

References heartbeatReceived.

Referenced by checkHeartbeat().

void cern::laser::client::impl::services::selection::HeartbeatHelper::onException ( MOMException  e  )  [inline]

The exception handler called in case of communication exception

Parameters:
e the MOMException caught

Implements cern::cmw::mom::pubsub::ExceptionListener.

References cmwConnected, cern::laser::client::services::selection::AlarmSelectionListener::onException(), selectionListener, and cern::cmw::mom::pubsub::MOMException::testException().

synchronized void cern::laser::client::impl::services::selection::HeartbeatHelper::resetHeartbeatReceptionTime (  )  [inline, private]
synchronized void cern::laser::client::impl::services::selection::HeartbeatHelper::setHeartbeatReceived ( boolean  value  )  [inline, private]

References heartbeatReceived.

Referenced by checkHeartbeat(), and initHeartbeatCheck().

void cern::laser::client::impl::services::selection::HeartbeatHelper::startHeartbeatCheck (  )  throws LaserException [inline]
void cern::laser::client::impl::services::selection::HeartbeatHelper::stopHeartbeatCheck (  )  throws LaserException [inline]

Member Data Documentation

Referenced by onException().

Referenced by getHeartbeatListener().

final Logger cern::laser::client::impl::services::selection::HeartbeatHelper::LOGGER = Logger.getLogger(HeartbeatHelper.class.getName()) [static, private]

Referenced by HeartbeatHelper().

final String cern::laser::client::impl::services::selection::HeartbeatHelper::SQL_FILTER = "HEARTBEAT = TRUE" [static, private]

Referenced by initHeartbeatCheck().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2