Public Member Functions | |
SourceClient (ContainerServices svc) throws Exception | |
void | connect () throws Exception |
void | receive (ACSJMSMessageEntity msg) |
void | addAlarmListener (SourceListener newListener) |
boolean | removeListener (SourceListener listener) |
void | close () |
Protected Member Functions | |
void | finalize () throws Throwable |
alma.alarmsystem.clients.SourceClient.SourceClient | ( | ContainerServices | svc | ) | throws Exception |
void alma.alarmsystem.clients.SourceClient.addAlarmListener | ( | SourceListener | newListener | ) |
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 |
Referenced by alma.acs.alarmsanalyzer.engine.AcsSourceClient.addAlarmSourceListener(), and alma.acs.alarm.source.gui.SourcePanel.SourcePanel().
void alma.alarmsystem.clients.SourceClient.close | ( | ) |
Frees all the resources
References alma.acs.nc.Consumer.disconnect().
Referenced by alma.alarmsystem.clients.SourceClient.finalize(), and alma.acs.alarmsanalyzer.engine.AcsSourceClient.shutdown().
void alma.alarmsystem.clients.SourceClient.connect | ( | ) | throws Exception |
Connect to the sources NC
Exception |
References alma.acs.nc.Consumer.addSubscription(), and alma.acs.nc.Consumer.consumerReady().
Referenced by alma.acs.alarmsanalyzer.engine.AcsSourceClient.connect(), and alma.acs.alarm.source.gui.SourcePanel.SourcePanel().
void alma.alarmsystem.clients.SourceClient.finalize | ( | ) | throws Throwable [protected] |
Ensure that the resources have been released before destroying the object
References alma.alarmsystem.clients.SourceClient.close().
void alma.alarmsystem.clients.SourceClient.receive | ( | ACSJMSMessageEntity | msg | ) |
The method receives all the messages published in the NC For each message received it check if its content is right i.e. the name of the class, the member and the code contains the number of the message in the sequence. In this way it also checks if the messages are received in the same order they were sent. The method also checks if all the messages have been received and prints a message if receives more messages then the messages pushed
msg | The message received from the NC |
boolean alma.alarmsystem.clients.SourceClient.removeListener | ( | SourceListener | listener | ) |
Remove a listener from the list of listeners to be notified when a new alarm is received
listener | The not null listener to remove |
Referenced by alma.acs.alarmsanalyzer.engine.AcsSourceClient.removeAlarmSourceListener().