
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 |
Private Member Functions | |
| synchronized void | dispatchXMLASIMessage (String msg) |
| synchronized void | dispatchFaultState (FaultState faultState) |
Private Attributes | |
| HashSet< SourceListener > | listeners = new HashSet<SourceListener>() |
| Consumer | m_consumer = null |
| String | m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES" |
| ContainerServices | contSvcs |
| volatile boolean | closed = false |
| Logger | logger |
| alma::alarmsystem::clients::SourceClient::SourceClient | ( | ContainerServices | svc | ) | throws Exception [inline] |
References contSvcs, alma::acs::container::ContainerServicesBase::getLogger(), and logger.
| void alma::alarmsystem::clients::SourceClient::addAlarmListener | ( | SourceListener | 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 closed, and listeners.
Referenced by alma::alarmsystem::clients::test::UserPropsTest::setUp(), alma::acs::alarmsystem::test::BACITest::setUp(), and alma::acs::alarm::source::gui::SourcePanel::SourcePanel().
| void alma::alarmsystem::clients::SourceClient::close | ( | ) | [inline] |
Frees all the resources
References closed, alma::acs::nc::Consumer::disconnect(), and m_consumer.
Referenced by finalize(), alma::alarmsystem::clients::test::UserPropsTest::tearDown(), and alma::acs::alarmsystem::test::BACITest::tearDown().
| void alma::alarmsystem::clients::SourceClient::connect | ( | ) | throws Exception [inline] |
Connect to the sources NC
| Exception |
References alma::acs::nc::Consumer::addSubscription(), closed, alma::acs::nc::Consumer::consumerReady(), contSvcs, logger, m_channelName, and m_consumer.
Referenced by alma::alarmsystem::clients::test::UserPropsTest::setUp(), alma::acs::alarmsystem::test::BACITest::setUp(), and alma::acs::alarm::source::gui::SourcePanel::SourcePanel().
| synchronized void alma::alarmsystem::clients::SourceClient::dispatchFaultState | ( | FaultState | faultState | ) | [inline, private] |
| synchronized void alma::alarmsystem::clients::SourceClient::dispatchXMLASIMessage | ( | String | msg | ) | [inline, private] |
| void alma::alarmsystem::clients::SourceClient::finalize | ( | ) | throws Throwable [inline, protected] |
| void alma::alarmsystem::clients::SourceClient::receive | ( | ACSJMSMessageEntity | msg | ) | [inline] |
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 |
References dispatchFaultState(), and dispatchXMLASIMessage().
| boolean alma::alarmsystem::clients::SourceClient::removeListener | ( | SourceListener | listener | ) | [inline] |
volatile boolean alma::alarmsystem::clients::SourceClient::closed = false [private] |
Referenced by addAlarmListener(), close(), connect(), finalize(), and removeListener().
Referenced by connect(), and SourceClient().
HashSet<SourceListener> alma::alarmsystem::clients::SourceClient::listeners = new HashSet<SourceListener>() [private] |
Referenced by addAlarmListener(), dispatchFaultState(), dispatchXMLASIMessage(), and removeListener().
Logger alma::alarmsystem::clients::SourceClient::logger [private] |
Referenced by connect(), and SourceClient().
String alma::alarmsystem::clients::SourceClient::m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES" [private] |
Referenced by connect().
Consumer alma::alarmsystem::clients::SourceClient::m_consumer = null [private] |
1.6.2