alma::acs::lasercore::test::stress::CategoryClient Class Reference

Collaboration diagram for alma::acs::lasercore::test::stress::CategoryClient:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CategoryClient (ContainerServices svc) throws Exception
void connect (Category[] categoriesToConnect) throws Exception
void connect () throws Exception
void disconnect ()
void addAlarmListener (CategoryListener newListener)
boolean removeListener (CategoryListener listener)
synchronized void dispatchAlarm (AlarmView newAlarm)

Private Member Functions

void getAlarmService () throws Exception
void getCategories () throws Exception
void dumpCategories ()
void initialize () throws Exception

Private Attributes

ContainerServices contSvc
String categoryRootTopic
Category[] categories
CategorySubscriber[] consumers
CERNAlarmService alarm
HashSet< CategoryListenerlisteners = new HashSet<CategoryListener>()

Detailed Description

A client that listen alarms from all the categories

Author:
acaproni

Constructor & Destructor Documentation

alma::acs::lasercore::test::stress::CategoryClient::CategoryClient ( ContainerServices  svc  )  throws Exception [inline]

Constructor

Parameters:
svc ACS ContainerServices used to access the alarm service component

References contSvc, and initialize().


Member Function Documentation

void alma::acs::lasercore::test::stress::CategoryClient::addAlarmListener ( CategoryListener  newListener  )  [inline]

Add a listener for the alarms.

Add the listeners to the set of listeners to be notified when a new alarms is received from the categories.

Parameters:
newListener The listener for alarms from categories

References listeners.

Referenced by alma::acs::lasercore::test::StressTest::setUp(), alma::acs::lasercore::test::IDLSendAlarmTest::setUp(), and alma::acs::lasercore::test::CoreCDBAlarmTest::setUp().

void alma::acs::lasercore::test::stress::CategoryClient::connect (  )  throws Exception [inline]

Connect to all available categories

References categories.

void alma::acs::lasercore::test::stress::CategoryClient::connect ( Category[]  categoriesToConnect  )  throws Exception [inline]
void alma::acs::lasercore::test::stress::CategoryClient::disconnect (  )  [inline]
synchronized void alma::acs::lasercore::test::stress::CategoryClient::dispatchAlarm ( AlarmView  newAlarm  )  [inline]

This method is called by categories when a new message arrives and dispatches the alarm to the listeners.

Parameters:
newAlarm The alarm to send to the listeners

References listeners.

Referenced by alma::acs::lasercore::test::stress::category::CategorySubscriber::adddAlarmView().

void alma::acs::lasercore::test::stress::CategoryClient::dumpCategories (  )  [inline, private]
void alma::acs::lasercore::test::stress::CategoryClient::getAlarmService (  )  throws Exception [inline, private]

Connect the AlarmSrevice component

References alarm, contSvc, and alma::alarmsystem::corbaservice::CernAlarmServiceUtils::getCernAlarmService().

Referenced by initialize().

void alma::acs::lasercore::test::stress::CategoryClient::getCategories (  )  throws Exception [inline, private]

Read the categories and the category root topic from the component

Returns:
The categories

References alarm, categories, categoryRootTopic, alma::alarmsystem::CERNAlarmServiceOperations::getCategories(), and alma::alarmsystem::CERNAlarmServiceOperations::getCategoryRootTopic().

Referenced by initialize().

void alma::acs::lasercore::test::stress::CategoryClient::initialize (  )  throws Exception [inline, private]

Initialize the client. It connects to the alarm component, get the list of the categories and release the component.

References alarm, categories, contSvc, dumpCategories(), getAlarmService(), getCategories(), and alma::acs::container::ContainerServicesBase::getLogger().

Referenced by CategoryClient().

boolean alma::acs::lasercore::test::stress::CategoryClient::removeListener ( CategoryListener  listener  )  [inline]

Remove a listener from the list of listeners to be notified when a new alarm is received

Parameters:
listener The not null listener to remove
Returns:
true if thle list of isteners contained the specified listener

References listeners.


Member Data Documentation

The alarm service

Referenced by disconnect(), getAlarmService(), getCategories(), and initialize().

The categories Each category is a notification channel we have to listen to. The list of the categories is read from the AlarmServise component

Referenced by connect(), dumpCategories(), getCategories(), and initialize().

Referenced by connect(), and disconnect().


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

Generated by  doxygen 1.6.2