
Static Public Member Functions | |
| static void | init (ContainerServicesBase containerServices) throws AcsJContainerServicesEx |
| static void | done () |
| static synchronized ACSAlarmSystemInterface | createSource (String sourceName) throws ACSASFactoryNotInitedEx, SourceCreationErrorEx |
| static ACSAlarmSystemInterface | createSource () throws ACSASFactoryNotInitedEx, SourceCreationErrorEx |
| static synchronized ACSFaultState | createFaultState () throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx |
| static ACSFaultState | createFaultState (String family, String member, int code) throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx |
| static boolean | usingACSAlarmSystem () throws ACSASFactoryNotInitedEx |
Static Private Member Functions | |
| static void | initCmwMom () throws Exception |
| static boolean | retrieveImplementationType (DAL dal) |
| static String | getProperty (String dao, String propName) |
Static Private Attributes | |
| static final String | CONFIGURATION_PATH = "Alarms/Administrative/AlarmSystemConfiguration" |
| static Boolean | useACSAlarmSystem = null |
| static ACSAlarmSystemInterface | source = null |
| static Logger | logger = null |
| static ContainerServicesBase | containerServices |
ACSAlarmSystemInterfaceFactory extends the CERN AlarmSystemInterfaceFactory to create sources with different implementations depending on the actual configuration in the CDB.
The type of implementation is in AlarmSystemConfiguration.xml: a property named Implementation. CERN implementation is used only if the property is CERN. If the property is not found, is ACS or the CDB record does not exist the ACS implementation for sources is used.
| static ACSFaultState alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::createFaultState | ( | String | family, | |
| String | member, | |||
| int | code | |||
| ) | throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx [inline, static] |
Factory method for creating ACSFaultState instances.
| family | the fault family. | |
| member | the fault member. | |
| code | the fault code. |
References createFaultState(), alma::alarmsystem::source::ACSFaultState::setCode(), alma::alarmsystem::source::ACSFaultState::setFamily(), and alma::alarmsystem::source::ACSFaultState::setMember().
| static synchronized ACSFaultState alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::createFaultState | ( | ) | throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx [inline, static] |
Factory method for creating ACSFaultState instances.
References useACSAlarmSystem.
Referenced by createFaultState().
| static ACSAlarmSystemInterface alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::createSource | ( | ) | throws ACSASFactoryNotInitedEx, SourceCreationErrorEx [inline, static] |
Create a new instance of an alarm system interface without binding it to any source.
| ASIException | if the AlarmSystemInterface instance can not be created. |
| static synchronized ACSAlarmSystemInterface alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::createSource | ( | String | sourceName | ) | throws ACSASFactoryNotInitedEx, SourceCreationErrorEx [inline, static] |
Create a new instance of an alarm system interface.
| sourceName | the source name. |
| ASIException | if the AlarmSystemInterface instance can not be created. |
References logger, source, and useACSAlarmSystem.
| static void alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::done | ( | ) | [inline, static] |
Cleanup the class. This method has to be called outside of the class and performs all the necessary clean up
References useACSAlarmSystem.
| static String alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::getProperty | ( | String | dao, | |
| String | propName | |||
| ) | [inline, static, private] |
Get the value of a property from the DAO.
| dao | The dao (XML string) | |
| propName | The name of the property |
Referenced by retrieveImplementationType().
| static void alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::init | ( | ContainerServicesBase | containerServices | ) | throws AcsJContainerServicesEx [inline, static] |
Init the static variables of the class This method has to be called before executing any other method.
| logger | The logger | |
| dal | The DAL to init the AS with CERN or ACS implementation |
| AcsJContainerServicesEx |
References containerServices, alma::acs::container::ContainerServicesBase::getCDB(), alma::acs::container::ContainerServicesBase::getLogger(), initCmwMom(), logger, retrieveImplementationType(), and useACSAlarmSystem.
| static void alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::initCmwMom | ( | ) | throws Exception [inline, static, private] |
Initialize cmw-mom (that in turn inits acs-jms) by setting the container services.
The container services must be set in a cmw-mom static variable in order the messages are published into the NC. The container services will be passed from this class down to the acs-jms classes.
References containerServices, and logger.
Referenced by init().
| static boolean alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::retrieveImplementationType | ( | DAL | dal | ) | [inline, static, private] |
Read the Implementation property from the Alarm System Configuration
| dal | The DAL |
References CONFIGURATION_PATH, com::cosylab::CDB::DALOperations::get_DAO(), and getProperty().
Referenced by init().
| static boolean alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::usingACSAlarmSystem | ( | ) | throws ACSASFactoryNotInitedEx [inline, static] |
Return the type of AS used
References useACSAlarmSystem.
final String alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::CONFIGURATION_PATH = "Alarms/Administrative/AlarmSystemConfiguration" [static, private] |
The path in the CDB of the AS configuraton
Referenced by retrieveImplementationType().
ContainerServicesBase alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::containerServices [static, private] |
Container services
Referenced by init(), and initCmwMom().
Logger alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::logger = null [static, private] |
The logger
Referenced by createSource(), init(), and initCmwMom().
ACSAlarmSystemInterface alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::source = null [static, private] |
At the present, while using the CERN implementation, we use the same source for sending all the alarms so we can use a singleton and return the same object to all the clients.
Referenced by createSource().
Boolean alma::alarmsystem::source::ACSAlarmSystemInterfaceFactory::useACSAlarmSystem = null [static, private] |
It is true if ACS implementation for sources must be used; false means CERN implementation.
It is null if it has not yet been initialized.
Referenced by createFaultState(), createSource(), done(), init(), and usingACSAlarmSystem().
1.6.2