
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< CategoryListener > | listeners = new HashSet<CategoryListener>() |
A client that listen alarms from all the categories
| alma::acs::lasercore::test::stress::CategoryClient::CategoryClient | ( | ContainerServices | svc | ) | throws Exception [inline] |
Constructor
| svc | ACS ContainerServices used to access the alarm service component |
References contSvc, and initialize().
| 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.
| 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] |
Create the consumers for the passed categories
| categoriesToConnect | The categories to connect to |
References categoryRootTopic, consumers, contSvc, and alma::acs::container::ContainerServicesBase::getLogger().
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::disconnect | ( | ) | [inline] |
Disconnect all the categories
References alarm, and consumers.
Referenced by alma::acs::lasercore::test::StressTest::tearDown(), alma::acs::lasercore::test::IDLSendAlarmTest::tearDown(), and alma::acs::lasercore::test::CoreCDBAlarmTest::tearDown().
| 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.
| 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] |
Dumps the category
References categories, categoryRootTopic, contSvc, and alma::acs::container::ContainerServicesBase::getLogger().
Referenced by initialize().
| 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
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
| listener | The not null listener to remove |
References listeners.
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(), dumpCategories(), and getCategories().
Referenced by connect(), and disconnect().
Referenced by CategoryClient(), connect(), dumpCategories(), getAlarmService(), and initialize().
HashSet<CategoryListener> alma::acs::lasercore::test::stress::CategoryClient::listeners = new HashSet<CategoryListener>() [private] |
Referenced by addAlarmListener(), dispatchAlarm(), and removeListener().
1.6.2