

Public Member Functions | |
| AlarmSystemInterfaceProxy (String sourceName) throws ASIException | |
| void | setSourceName (String newSourceName) |
| String | getSourceName () |
| void | close () |
| void | onException (MOMException e) |
| void | pull (PullEvent event) throws PullException |
| void | push (FaultState state) throws ASIException |
| void | push (Collection states) throws ASIException |
| void | pushActiveList (Collection active) throws ASIException |
Protected Member Functions | |
| void | finalize () throws Throwable |
Private Member Functions | |
| void | publish (Collection states, boolean backup) throws Exception |
Private Attributes | |
| ASIConfiguration | configuration |
| Publisher | publisher |
| String | hostName |
| String | sourceName = "UNDEFINED" |
| SynchroBuffer | buffer |
| boolean | connected |
Static Private Attributes | |
| static Category | cat = Category.getInstance(AlarmSystemInterfaceProxy.class.getName()) |
This class is the implementation of the interface between an alarm source and the alarm system. It provides the functionality defined in the interface AlarmSystemInterface.
| cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::AlarmSystemInterfaceProxy | ( | String | sourceName | ) | throws ASIException [inline] |
Create a new instance of AlarmSystemInterfaceProxy
| sourceName | the name of the alarm source |
References buffer, cat, configuration, connected, cern::laser::util::buffer::SynchroBuffer::enable(), cern::laser::source::alarmsysteminterface::impl::Configurator::getConfiguration(), hostName, publisher, cern::cmw::mom::pubsub::Publisher::setExceptionListener(), cern::laser::source::alarmsysteminterface::ASIException::setRootCause(), setSourceName(), cern::laser::util::buffer::SynchroBuffer::setSynchroBufferListener(), and sourceName.
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::close | ( | ) | [inline] |
Close the instance.
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
References buffer, cat, cern::cmw::mom::pubsub::Publisher::close(), cern::laser::util::buffer::SynchroBuffer::close(), connected, and publisher.
Referenced by finalize().
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::finalize | ( | ) | throws Throwable [inline, protected] |
| String cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::getSourceName | ( | ) | [inline] |
Get the source name.
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
References sourceName.
Referenced by publish().
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::onException | ( | MOMException | e | ) | [inline] |
The exception handler called in case of communication exception
| e | the MOMException caught |
Implements cern::cmw::mom::pubsub::ExceptionListener.
References connected, and cern::cmw::mom::pubsub::MOMException::testException().
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::publish | ( | Collection | states, | |
| boolean | backup | |||
| ) | throws Exception [inline, private] |
Publish a collection of fault states.
| states | the fault states collection to publish | |
| backup | the type of fault states to publish (backup or not) |
| Exception | if publishing fails |
References cat, configuration, cern::cmw::mom::pubsub::Publisher::createTextMessage(), getSourceName(), hostName, cern::cmw::mom::pubsub::Publisher::publish(), and publisher.
Referenced by pull(), and pushActiveList().
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::pull | ( | PullEvent | event | ) | throws PullException [inline] |
Implement the SysnchroBufferListener interface.
| event | the alarm message collection pulled from the buffer |
| PullException | if the messages can not be published |
Implements cern::laser::util::buffer::SynchroBufferListener.
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::push | ( | Collection | states | ) | throws ASIException [inline] |
Push an fault states collection.
| states | the fault states collection to push |
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
Reimplemented in alma::acs::alarmsystem::binding::ACSLaserSource.
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::push | ( | FaultState | state | ) | throws ASIException [inline] |
Push a fault state.
| state | the fault state to push |
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
References buffer, connected, and cern::laser::util::buffer::SynchroBuffer::push().
Referenced by push().
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::pushActiveList | ( | Collection | active | ) | throws ASIException [inline] |
Push the source active list forcing a backup
| active | the source active list |
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
Reimplemented in alma::acs::alarmsystem::binding::ACSLaserSource.
| void cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::setSourceName | ( | String | newSourceName | ) | [inline] |
Set the source name.
| newSourceName | the source name. |
Implements cern::laser::source::alarmsysteminterface::AlarmSystemInterface.
References sourceName.
Referenced by AlarmSystemInterfaceProxy().
SynchroBuffer cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::buffer [private] |
the local buffer for packing alarm messages
Referenced by AlarmSystemInterfaceProxy(), close(), and push().
Category cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::cat = Category.getInstance(AlarmSystemInterfaceProxy.class.getName()) [static, private] |
logging category
Referenced by AlarmSystemInterfaceProxy(), close(), finalize(), publish(), pull(), and pushActiveList().
ASIConfiguration cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::configuration [private] |
configuration
Referenced by AlarmSystemInterfaceProxy(), and publish().
boolean cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::connected [private] |
MOM connection flag
Referenced by AlarmSystemInterfaceProxy(), close(), onException(), push(), and pushActiveList().
String cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::hostName [private] |
the hostname
Referenced by AlarmSystemInterfaceProxy(), and publish().
Publisher cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::publisher [private] |
the publisher
Referenced by AlarmSystemInterfaceProxy(), close(), and publish().
String cern::laser::source::alarmsysteminterface::impl::AlarmSystemInterfaceProxy::sourceName = "UNDEFINED" [private] |
the source name
Referenced by alma::acs::alarmsystem::binding::ACSLaserSource::ACSLaserSource(), AlarmSystemInterfaceProxy(), getSourceName(), and setSourceName().
1.6.2