public class ACSAlarmSystemInterfaceFactory
extends java.lang.Object
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 value of such property is CERN. If the property is not found, is ACS or the CDB record does not exist then the ACS implementation for sources is used.
ACSAlarmSystemInterfaceFactory owns the instances of the AlarmSource
created by the component or containers. in this way it is possible to control the cleanup
of the alarm sources when a component is unloaded or the ACSAlarmSystemInterfaceFactory
terminates.
| Constructor and Description |
|---|
ACSAlarmSystemInterfaceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static ACSFaultState |
createFaultState()
Factory method for creating ACSFaultState instances.
|
static ACSFaultState |
createFaultState(java.lang.String family,
java.lang.String member,
int code)
Factory method for creating ACSFaultState instances.
|
static ACSAlarmSystemInterface |
createSource()
Create a new instance of an alarm system interface without binding it to any source.
|
static ACSAlarmSystemInterface |
createSource(java.lang.String sourceName)
Create a new instance of an alarm system interface.
|
static void |
done()
Cleanup the class.
|
static AlarmSource |
getAlarmSource(ContainerServicesBase contSvcs)
Return the AlarmSource for the container whose name is retrieved from the passed
ContainerServicesBase by delegating to the AlarmSourceFactory. |
static void |
init(ContainerServicesBase containerServices)
Init the static variables of the class
This method has to be called before executing any other
method.
|
static void |
releaseAlarmSource(ContainerServicesBase contSvcs)
Release the
AlarmSource object of the component whose name is read from
passed the ContainerServicesBase by delegating to the AlarmSourceFactory. |
static boolean |
usingACSAlarmSystem()
Return the type of AS used
|
public static void init(ContainerServicesBase containerServices) throws AcsJContainerServicesEx
logger - The loggerdal - The DAL to init the AS with CERN or ACS implementationAcsJContainerServicesExpublic static void done()
public static ACSAlarmSystemInterface createSource(java.lang.String sourceName) throws ACSASFactoryNotInitedEx, SourceCreationErrorEx
sourceName - the source name.ASIException - if the AlarmSystemInterface instance can not be created.ACSASFactoryNotInitedExSourceCreationErrorExpublic static ACSAlarmSystemInterface createSource() throws ACSASFactoryNotInitedEx, SourceCreationErrorEx
ASIException - if the AlarmSystemInterface instance can not be created.ACSASFactoryNotInitedExSourceCreationErrorExpublic static ACSFaultState createFaultState() throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx
ACSASFactoryNotInitedExFaultStateCreationErrorExpublic static ACSFaultState createFaultState(java.lang.String family, java.lang.String member, int code) throws ACSASFactoryNotInitedEx, FaultStateCreationErrorEx
family - the fault family.member - the fault member.code - the fault code.ACSASFactoryNotInitedExFaultStateCreationErrorExpublic static boolean usingACSAlarmSystem()
throws ACSASFactoryNotInitedEx
java.lang.IllegalStateException - If the factory has not been initialized yetACSASFactoryNotInitedExpublic static AlarmSource getAlarmSource(ContainerServicesBase contSvcs)
ContainerServicesBase by delegating to the AlarmSourceFactory.contSvcs - The ContainerServicespublic static void releaseAlarmSource(ContainerServicesBase contSvcs)
AlarmSource object of the component whose name is read from
passed the ContainerServicesBase by delegating to the AlarmSourceFactory.containerServices - The ContainerServices