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

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

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 getAlarmServiceComponent () throws Exception
void releaseAlarmServiceComponent ()
void getCategories () throws Exception
void dumpCategories ()
void initialize () throws Exception

Private Attributes

ContainerServices contSvc
String categoryRootTopic
Category[] categories
CategorySubscriber[] consumers
String alarmName
final String alarmServiceIDL = "*/AlarmService:*"
AlarmService 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


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

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

Connect to all available categories

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

Create the consumers for the passed categories

Parameters:
categoriesToConnect The categories to connect to

void alma::acs::lasercore::test::stress::CategoryClient::disconnect  )  [inline]
 

Disconnect all the categories

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

void alma::acs::lasercore::test::stress::CategoryClient::dumpCategories  )  [inline, private]
 

Dumps the category

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

Connect the AlarmSrevice component

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

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.

void alma::acs::lasercore::test::stress::CategoryClient::releaseAlarmServiceComponent  )  [inline, private]
 

Release the alarm component

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


Member Data Documentation

AlarmService alma::acs::lasercore::test::stress::CategoryClient::alarm [private]
 

String alma::acs::lasercore::test::stress::CategoryClient::alarmName [private]
 

final String alma::acs::lasercore::test::stress::CategoryClient::alarmServiceIDL = "*/AlarmService:*" [private]
 

Category [] alma::acs::lasercore::test::stress::CategoryClient::categories [private]
 

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

String alma::acs::lasercore::test::stress::CategoryClient::categoryRootTopic [private]
 

CategorySubscriber [] alma::acs::lasercore::test::stress::CategoryClient::consumers [private]
 

ContainerServices alma::acs::lasercore::test::stress::CategoryClient::contSvc [private]
 

HashSet<CategoryListener> alma::acs::lasercore::test::stress::CategoryClient::listeners = new HashSet<CategoryListener>() [private]
 


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