
Public Member Functions | |
| AlarmSystemCorbaServer (AcsLogger logger, String[] args) throws Exception | |
| void | destroy () |
| ORB | getORB () |
| POA | getRootPOA () |
| void | run () |
| Object | getServiceFromNameServer (final String serviceName) throws Exception |
| Logger | getLogger () |
| OffShoot | activateOffShoot (Servant servant) throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
| void | deactivateOffShoot (Servant cbServant) throws AcsJContainerServicesEx, AcsJContainerEx |
| POA | getPOAForOffshoots (POA componentPOA) throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
| synchronized void | shutdown () |
Static Public Member Functions | |
| static void | main (String[] args) |
Private Member Functions | |
| Servant | instantiateCernAS () throws Exception |
| void | internalInitialize (String[] args) throws Exception |
| NamingContext | getNamingContext () throws InvalidName |
| void | registerToNamingService (org.omg.CORBA.Object laserObject) throws Exception |
| void | unregisterToNamingService () throws Exception |
| void | checkOffShootServant (Servant servant) throws AcsJContainerServicesEx |
| DAL | getCDB () throws Exception |
| boolean | getAlarmSystemType () throws Exception |
Private Attributes | |
| ORB | orb = null |
| volatile boolean | destroyState = false |
| POA | rootPOA = null |
| POA | asPOA = null |
| POAManager | poaManager |
| final AcsLogger | m_logger |
| Policy[] | m_offshootPolicies |
| boolean | isInitialized = false |
| volatile boolean | closed = false |
| Servant | laserComponent = null |
| Servant | acsComponent = null |
Class that provides default ACS CORBA service implementation.
The constructor activate the CORBA servant: the ACS or the CERN implementation, depending on the value read from the CDB.
| alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::AlarmSystemCorbaServer | ( | AcsLogger | logger, | |
| String[] | args | |||
| ) | throws Exception [inline] |
Constructor for DefaultCORBAService.
| logger | The logger | |
| args | The arguments from the command line |
References acsComponent, asPOA, getAlarmSystemType(), instantiateCernAS(), internalInitialize(), laserComponent, m_logger, registerToNamingService(), run(), and shutdown().
Referenced by main().
| OffShoot alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::activateOffShoot | ( | Servant | servant | ) | throws AcsJContainerEx, AcsJUnexpectedExceptionEx [inline] |
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::checkOffShootServant | ( | Servant | servant | ) | throws AcsJContainerServicesEx [inline, private] |
| cbServant |
| ContainerException |
References m_logger, alma::JavaContainerError::wrappers::AcsJContainerServicesEx::setContextInfo(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameter(), and alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameterValue().
Referenced by deactivateOffShoot().
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::deactivateOffShoot | ( | Servant | cbServant | ) | throws AcsJContainerServicesEx, AcsJContainerEx [inline] |
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::destroy | ( | ) | [inline] |
Overloads the destroy to first perform a ORB shutdown.
References destroyState, and orb.
Referenced by internalInitialize().
| boolean alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getAlarmSystemType | ( | ) | throws Exception [inline, private] |
Query the CDB to understand which one between ACS and CERN implementation has to be used
true if ACS implementation must be used | Exception | In case of error |
References com::cosylab::CDB::DALOperations::get_DAO(), getCDB(), alma::acs::logging::AcsLogger::log(), and m_logger.
Referenced by AlarmSystemCorbaServer().
| DAL alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getCDB | ( | ) | throws Exception [inline, private] |
Get a reference to the DAL.
| Exception | In case of error getting the DAL |
References getNamingContext().
Referenced by getAlarmSystemType().
| Logger alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getLogger | ( | ) | [inline] |
References m_logger.
Referenced by alma::acs::alarmsystem::acsimpl::AcsAlarmSystem::AcsAlarmSystem(), and com::cosylab::acs::laser::LaserComponent::initialize().
| NamingContext alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getNamingContext | ( | ) | throws InvalidName [inline, private] |
Get the NamingContext
References orb.
Referenced by getCDB(), getServiceFromNameServer(), registerToNamingService(), and unregisterToNamingService().
| ORB alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getORB | ( | ) | [inline] |
Returns Object Request Broker (ORB) object.
References orb.
Referenced by alma::alarmsystem::corbaservice::AlarmSystemContainerServices::AlarmSystemContainerServices(), and com::cosylab::acs::laser::LaserComponent::fromBusinessAlarm().
| POA alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getPOAForOffshoots | ( | POA | componentPOA | ) | throws AcsJContainerEx, AcsJUnexpectedExceptionEx [inline] |
References m_logger, m_offshootPolicies, poaManager, and alma::JavaContainerError::wrappers::AcsJContainerEx::setContextInfo().
Referenced by activateOffShoot(), and deactivateOffShoot().
| POA alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getRootPOA | ( | ) | [inline] |
Returns root Portable Object Adapter (POA) object.
References rootPOA.
| Object alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::getServiceFromNameServer | ( | final String | serviceName | ) | throws Exception [inline] |
Get an object by browsing the name service
| serviceName | The name of the service to get from the server |
| org.omg.CosNaming.NamingContextPackage.InvalidName | ||
| CannotProceed | ||
| NotFound |
References getNamingContext().
Referenced by alma::alarmsystem::corbaservice::AlarmSystemContainerServices::getCDB().
| Servant alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::instantiateCernAS | ( | ) | throws Exception [inline, private] |
Instantiate the CERN alarm service.
At this point the CERN class are still unknown because they are built very late in ACS. Therefore the CERN alarm system is instantiated dynamically.
References alma::acs::logging::AcsLogger::log(), and m_logger.
Referenced by AlarmSystemCorbaServer().
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::internalInitialize | ( | String[] | args | ) | throws Exception [inline, private] |
Initializes the CORBA.
| args | The command line arguments |
References asPOA, destroy(), alma::acs::logging::AcsLogger::log(), m_logger, orb, poaManager, and rootPOA.
Referenced by AlarmSystemCorbaServer().
| static void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::main | ( | String[] | args | ) | [inline, static] |
References AlarmSystemCorbaServer().
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::registerToNamingService | ( | org.omg.CORBA.Object | laserObject | ) | throws Exception [inline, private] |
Register the AlarmService name to the Naming Service.
The name to register is taken from the IDL interface.
| laserObject | The CORBA object to bind to the name |
References getNamingContext(), alma::acs::logging::AcsLogger::log(), and m_logger.
Referenced by AlarmSystemCorbaServer().
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::run | ( | ) | [inline] |
Main thread to handle CORBA requests.
References destroyState, alma::acs::logging::AcsLogger::log(), m_logger, and orb.
Referenced by AlarmSystemCorbaServer().
| synchronized void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::shutdown | ( | ) | [inline] |
Shuts down the CORBA services.
Note that this method is called by the alarm service as part of its shutdown sequence. But it is also executed when the JVM shuts down (shutdown hook)
References acsComponent, closed, laserComponent, alma::acs::logging::AcsLogger::log(), m_logger, orb, poaManager, rootPOA, and unregisterToNamingService().
Referenced by AlarmSystemCorbaServer(), com::cosylab::acs::laser::LaserComponent::LaserComponentTerminator::run(), and alma::acs::alarmsystem::acsimpl::AcsAlarmSystem::AcsComponentTerminator::run().
| void alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::unregisterToNamingService | ( | ) | throws Exception [inline, private] |
Unregister the AlarmService name to the Naming Service.
The name to unregister is taken from the IDL interface.
References getNamingContext(), alma::acs::logging::AcsLogger::log(), and m_logger.
Referenced by shutdown().
Servant alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::acsComponent = null [private] |
The ACS CORBA servant
One and only one between laserComponent and acsComponent is not null.
Referenced by AlarmSystemCorbaServer(), and shutdown().
POA alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::asPOA = null [private] |
Alarm System POA.
Referenced by AlarmSystemCorbaServer(), and internalInitialize().
volatile boolean alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::closed = false [private] |
Signal if the server has been closed
Referenced by shutdown().
volatile boolean alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::destroyState = false [private] |
boolean alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::isInitialized = false [private] |
Servant alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::laserComponent = null [private] |
The CERN CORBA servant
One and only one between laserComponent and acsComponent is not null.
Referenced by AlarmSystemCorbaServer(), and shutdown().
Policy [] alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::m_offshootPolicies [private] |
Referenced by getPOAForOffshoots().
ORB alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::orb = null [private] |
Object Request Broker (ORB) object.
Referenced by destroy(), getNamingContext(), getORB(), internalInitialize(), run(), and shutdown().
POAManager alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::poaManager [private] |
POA manager
Referenced by getPOAForOffshoots(), internalInitialize(), and shutdown().
POA alma::acs::alarmsystem::corbaservice::AlarmSystemCorbaServer::rootPOA = null [private] |
Root Portable Object Adapter (POA) object.
Referenced by activateOffShoot(), deactivateOffShoot(), getRootPOA(), internalInitialize(), and shutdown().
1.6.2