Public Member Functions | Protected Member Functions

alma.alarmsystem.clients.CategoryClient Class Reference

Inheritance diagram for alma.alarmsystem.clients.CategoryClient:
alma.acs.alarmsanalyzer.engine.AcsCategoryClient

List of all members.

Public Member Functions

 CategoryClient (ContainerServices contServices) throws AlarmClientException
 CategoryClient (ORB orb, AcsLogger logger)
void connect (AlarmSelectionListener listener) throws AlarmClientException, AcsJCannotGetComponentEx
void connect (AlarmSelectionListener listener, Category[] categories) throws AlarmClientException, AcsJCannotGetComponentEx
void close () throws AlarmClientException
Alarm[] getParents (String id, boolean node) throws AlarmClientException
Alarm[] getChildren (String id, boolean node) throws AlarmClientException
int getMultiplicityThreshold (String id) throws AlarmClientException
Alarm[] getActiveChildren (String id, boolean node) throws AlarmClientException

Protected Member Functions

void finalize () throws Throwable

Detailed Description

A client that listen to alarms from all the categories.

It is a wrapper to CERN classes in order to simplify the usage from ACS without dealing with low level details of the alarm system.

The class connects to the alarm system as a CERN client, logging in a generic user. The listener receives alarms and errors from the alarm system by means of a callback. The alarm system sends all the already active alarms when the user logs is.

The close() method has to be called in order to free all the resources.

Author:
acaproni

Constructor & Destructor Documentation

alma.alarmsystem.clients.CategoryClient.CategoryClient ( ContainerServices  contServices  )  throws AlarmClientException

Constructor

Parameters:
contServices The containerServices
Exceptions:
AlarmClientException 
alma.alarmsystem.clients.CategoryClient.CategoryClient ( ORB  orb,
AcsLogger  logger 
)

Contructor

Parameters:
orb The orb
logger The logger

Member Function Documentation

void alma.alarmsystem.clients.CategoryClient.connect ( AlarmSelectionListener  listener,
Category[]  categories 
) throws AlarmClientException, AcsJCannotGetComponentEx

Connects to the passed categories of the alarm system

Parameters:
listener The lister to notify of the alarms received from the categories
categories The categories to connect to
Exceptions:
AcsJCannotGetComponentEx In case the AlarmService is not available
AlarmClientException In case of failure connecting the client

References cern.laser.client.services.selection.AlarmSelectionHandler.get(), alma.alarmsystem.corbaservice.CernAlarmServiceUtils.getCernAlarmService(), cern.laser.console.User.getDefaultConfiguration(), cern.laser.console.Configuration.getSelection(), cern.laser.console.impl.UserHandlerImpl.getUser(), alma.acs.logging.AcsLogger.log(), and cern.laser.client.services.selection.AlarmSelectionHandler.select().

void alma.alarmsystem.clients.CategoryClient.connect ( AlarmSelectionListener  listener  )  throws AlarmClientException, AcsJCannotGetComponentEx

Connects to all the categories of the alarm system.

It is equivalent to connect(listener,null).

Parameters:
listener The lister to notify of the alarms received from the categories
Exceptions:
AlarmClientException In case of failure connecting the client
AcsJCannotGetComponentEx If the alarm service component is not available
See also:
CategoryClient.connect(AlarmSelectionListener, Category[])

Referenced by alma.acsplugins.alarmsystem.gui.CernSysPanel.connect().

void alma.alarmsystem.clients.CategoryClient.finalize (  )  throws Throwable [protected]

Ensure that the resources have been released before destroying the object

References alma.alarmsystem.clients.CategoryClient.close().

Alarm [] alma.alarmsystem.clients.CategoryClient.getActiveChildren ( String  id,
boolean  node 
) throws AlarmClientException

Get the active children of a reduced alarm.

The method asks the alarm service component for the active children of a reduced alarm.

Parameters:
id The id of the alarm
node true if the alarm is a Node alarm; false if the alarm of the passed ID is a multiplicity.
Returns:
The array of the alarm parent of the alarm with the passed ID
Exceptions:
AlarmClientException In case of error getting the alarms from the component
Alarm [] alma.alarmsystem.clients.CategoryClient.getChildren ( String  id,
boolean  node 
) throws AlarmClientException

Get the parents of a reduced alarm.

The method asks the alarm service component for the children of a reduced alarm.

Parameters:
id The id of the alarm
node true if the alarm is a Node alarm; false if the alarm of the passed ID is a multiplicity.
Returns:
The array of the alarm parent of the alarm with the passed ID
Exceptions:
AlarmClientException In case of error getting the alarms from the component
int alma.alarmsystem.clients.CategoryClient.getMultiplicityThreshold ( String  id  )  throws AlarmClientException

Return the threshold for the multiplicity node whose ID is passed as parameter.

Parameters:
id The id of the multiplicity node
Returns:
The multiplicity threshold of the node with the given id
Exceptions:
AlarmClientException If an error happens getting the threshold from the component
Alarm [] alma.alarmsystem.clients.CategoryClient.getParents ( String  id,
boolean  node 
) throws AlarmClientException

Get the parents of a reduced alarm.

The method asks the alarm service component for the parents of a reduced alarm.

Parameters:
id The id of the alarm
node true if the alarm is a Node alarm; false if the alarm of the passed ID is a multiplicity.
Returns:
The array of the alarm parent of the alarm with the passed ID
Exceptions:
AlarmClientException In case of error getting the alarms from the component

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties