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

alma::alarmsystem::clients::SourceClient Class Reference

List of all members.

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 dispatchFaultState (FaultState faultState)

Private Attributes

HashSet< SourceListenerlisteners = 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

Constructor & Destructor Documentation

alma::alarmsystem::clients::SourceClient::SourceClient ContainerServices  svc  )  throws Exception [inline]
 


Member Function Documentation

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.

Parameters:
newListener The listener for alarms from categories

void alma::alarmsystem::clients::SourceClient::close  )  [inline]
 

Frees all the resources

void alma::alarmsystem::clients::SourceClient::connect  )  throws Exception [inline]
 

Connect to the sources NC

Exceptions:
Exception 

synchronized void alma::alarmsystem::clients::SourceClient::dispatchFaultState FaultState  faultState  )  [inline, private]
 

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::alarmsystem::clients::SourceClient::finalize  )  throws Throwable [inline, protected]
 

Ensure that the resources have been released before destroying the object

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

Parameters:
msg The message received from the NC
See also:
alma.acs.nc.Consumer

boolean alma::alarmsystem::clients::SourceClient::removeListener SourceListener  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 the list of listeners contained the specified listener


Member Data Documentation

volatile boolean alma::alarmsystem::clients::SourceClient::closed = false [private]
 

ContainerServices alma::alarmsystem::clients::SourceClient::contSvcs [private]
 

HashSet<SourceListener> alma::alarmsystem::clients::SourceClient::listeners = new HashSet<SourceListener>() [private]
 

Logger alma::alarmsystem::clients::SourceClient::logger [private]
 

String alma::alarmsystem::clients::SourceClient::m_channelName = "CMW.ALARM_SYSTEM.ALARMS.SOURCES.ALARM_SYSTEM_SOURCES" [private]
 

Consumer alma::alarmsystem::clients::SourceClient::m_consumer = null [private]
 


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