Public Member Functions | |
String | getName () |
AcsLogger | getLogger () |
DAL | getCDB () throws AcsJContainerServicesEx |
public< T extends Servant &OffShootOperations > OffShoot | activateOffShoot (T cbServant) throws AcsJContainerServicesEx |
void | deactivateOffShoot (Object offshootImpl) throws AcsJContainerServicesEx |
AdvancedContainerServices | getAdvancedContainerServices () |
ThreadFactory | getThreadFactory () |
Through this interface, the container offers services to its hosted components. The component must call these methods explicitly; in this respect, ContainerServices
is different from the other services that the container provides without the component implementation knowing about it. It can be thought of as a callback handle or a library.
Currently, methods are added to this interface as the functionality becomes available. At some point we will have to declutter the interface by introducing 2nd-level interfaces that harbor cohesive functionality. For example, instead of calling myContainerServices.getComponent(...)
, the new call will then be something like myContainerServices.communication().getComponent(...)
.
created on Oct 24, 2002 12:56:36 PM
public<T extends Servant & OffShootOperations> OffShoot alma.acs.container.ContainerServicesBase.activateOffShoot | ( | T | cbServant | ) | throws AcsJContainerServicesEx |
Activates a CORBA servant that implements alma.ACS.OffShoot. The purpose of the OffShoot marker interface is to crack down on uncontrolled activation of just any CORBA services by Java components, while allowing this for selected subtypes of OffShoot, like alma.ACS.Callback.
The OffShoot servant can be either a subclass of the xyzPOA skeleton, or a xyzPOATie instance (delegation model). Since ACS 4.1.2, a tie servant is detected, and interception code gets inserted between the POATie skeleton and the offshoot implementation class. This way, the container can intercept (and log) calls to offshoots in the same way as it does for calls to components. It is therefore recommended to use the tie approach for all offshoot servants, unless there is a reason to avoid container interception.
Note that since ACS 9.0 we are using generics to express that the offshoot impl object must be both a corba servant and implement OffShootOperations.
cbServant | the CORBA-generated servant, e.g. CBdoublePOA; must implement alma.ACS.OffShootOperations . |
CBdouble myCBdouble = alma.ACS.CBdoubleHelper.narrow(...)
. ContainerException | if anything goes wrong, especially if cbServant is not an OffShoot. |
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by alma.acs.callbacks.RequesterUtil.giveCBDoubleSequence(), alma.acs.callbacks.RequesterUtil.giveCBLongSequence(), alma.acs.callbacks.RequesterUtil.giveCBStringSequence(), alma.acs.nc.AcsNcReconnectionCallback.init(), alma.acs.nc.refactored.NCPublisher.NCPublisher(), and alma.acs.nc.SimpleSupplier.SimpleSupplier().
void alma.acs.container.ContainerServicesBase.deactivateOffShoot | ( | Object | offshootImpl | ) | throws AcsJContainerServicesEx |
Deactivates the offshoot object previously activated through the activateOffShoot(Object, Class) method. Caution: this method returns immediately, while the underlying org.omg.PortableServer.POAOperations#deactivate_object(byte[]) still works on the deactivation. If activateOffShoot(Servant) is called too shortly after deactivation, an exception will be thrown. TODO: find a remedy
offshootImpl | the offshoot object implementation |
AcsJContainerServicesEx | if something goes wrong, e.g., if the corresponding offshoot servant was not active. |
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, and alma.acs.container.ContainerServicesImpl.
Referenced by alma.demo.XmlComponentImpl.XmlComponentImpl.deactivateOffshoot(), alma.acs.container.ContainerServicesProxy.deactivateOffShoot(), alma.ACS.MasterComponentImpl.StateChangeListener.destroyMonitor(), alma.acs.nc.SimpleSupplier.disconnect(), alma.acs.nc.refactored.NCPublisher.disconnect(), alma.acs.nc.AcsNcReconnectionCallback.disconnect(), alma.ACS.impl.CommonPropertyImpl.unregisterMonitor(), and alma.ACS.impl.CharacteristicComponentImpl.unregisterProperty().
AdvancedContainerServices alma.acs.container.ContainerServicesBase.getAdvancedContainerServices | ( | ) |
More specialized methods are available from the AdvancedContainerServices
.
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by alma.alarmsystem.corbaservice.CernAlarmServiceUtils.CernAlarmServiceUtils(), alma.acs.nc.AnyAide.complexObjectToCorbaAny(), com.cosylab.logging.LoggingClient.connect(), alma.acs.nc.AnyAide.doubleArrayToCorbaAny(), alma.acs.nc.AnyAide.floatArrayToCorbaAny(), alma.ACS.impl.CharacteristicModelImpl.get_all_characteristics(), alma.ACS.impl.CharacteristicModelImpl.get_characteristic_by_name(), alma.acs.container.ContainerServicesProxy.getAdvancedContainerServices(), alma.acs.nc.ChannelProperties.getCDBAdminProps(), alma.acs.nc.ChannelProperties.getCDBQoSProps(), alma.acs.nc.AnyAide.intArrayToCorbaAny(), alma.acs.nc.AnyAide.objectToCorbaAny(), alma.acs.nc.SimpleSupplier.publishEvent(), alma.acs.nc.refactored.NCPublisher.publishEvent(), alma.acs.nc.ArchiveSupplier.publishEvent(), and alma.acs.nc.AnyAide.stringArrayToCorbaAny().
DAL alma.acs.container.ContainerServicesBase.getCDB | ( | ) | throws AcsJContainerServicesEx |
Convenience method for accessing the Configuration Database.
Currently more than a convenience, given that the CDB is not yet a Java component, but a separate service...
ContainerException |
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by cl.utfsm.acs.acg.core.DAOManager.backupCDB(), alma.acs.nc.ChannelProperties.cdbChannelConfigExists(), cl.utfsm.acs.acg.core.DAOManager.connect(), alma.acs.container.ContainerServicesProxy.getCDB(), alma.acs.alarmsanalyzer.engine.AcsSourceClient.getCDB(), alma.acs.nc.ChannelProperties.getCDBAdminProps(), alma.acs.nc.ChannelProperties.getCDBQoSProps(), cl.utfsm.acs.acg.core.AcsInformation.getDAL(), alma.acs.nc.ChannelInfo.getEventHandlerTimeoutMap(), alma.alarmsystem.source.ACSAlarmSystemInterfaceFactory.init(), alma.ACS.impl.CharacteristicComponentImpl.initialize(), alma.acs.nc.ChannelProperties.isTraceEventsEnabled(), and alma.ACS.impl.PropertyImpl.PropertyImpl().
AcsLogger alma.acs.container.ContainerServicesBase.getLogger | ( | ) |
Gets a Logger
object that the component should use for logging.
The Logger
will be set up with a namespace specific to the component that uses this ContainerServices
instance.
Specific logger extensions that only apply to certain subsystems can be used by wrapping this logger with a class such as alma.acs.logging.domainspecific.AntennaContextLogger.
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by alma.acs.alarmsystem.source.AlarmSourceImpl.AlarmSourceImpl(), alma.acs.nc.AnyAide.AnyAide(), alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker(), alma.alarmsystem.corbaservice.CernAlarmServiceUtils.CernAlarmServiceUtils(), alma.acs.nc.ChannelInfo.ChannelInfo(), alma.acs.nc.ChannelProperties.ChannelProperties(), alma.ACS.impl.CommonPropertyImpl.CommonPropertyImpl(), cl.utfsm.acs.acg.core.DAOManager.getAlarmDAO(), cl.utfsm.acs.acg.core.DAOManager.getAlarmSystemDAO(), cl.utfsm.acs.acg.core.DAOManager.getCategoryDAO(), alma.acs.container.ContainerServicesProxy.getLogger(), alma.acs.alarmsanalyzer.engine.AcsSourceClient.getLogger(), cl.utfsm.acs.acg.core.AcsInformation.getLogger(), cl.utfsm.samplingSystemUI.core.SamplingManager.getSamplingObj(), cl.utfsm.acs.acg.core.DAOManager.getSourceDAO(), alma.alarmsystem.source.ACSAlarmSystemInterfaceFactory.init(), alma.contLogTest.TestLogLevelsCompImpl.TestLogLevelsCompImpl.initialize(), alma.lifecycleTest.TestLifeCycleCompImpl.TestLifeCycleCompImpl.initialize(), alma.demo.HelloDemoImpl.HelloDemoImpl.initialize(), alma.COUNTER.CounterSupplierImpl.CounterSupplierImpl.initialize(), alma.COUNTER.CounterConsumerImpl.CounterConsumerImpl.initialize(), alma.acs.component.ComponentImplBase.initialize(), cl.utfsm.samplingSystemUI.SampTool.initializeComponents(), alma.demo.client.LampComponentClient1.LampComponentClient1(), alma.demo.client.HelloDemoClient.main(), alma.acs.nc.refactored.NCPublisher.NCPublisher(), cl.utfsm.samplingSystemUI.core.NotificationChannelSuscription.NotificationChannelSuscription(), cl.utfsm.samplingSystemUI.core.NotificationChannelSuscription.push_structured_event(), alma.acs.alarmsystem.source.AlarmSender.sendAlarm(), and alma.alarmsystem.clients.SourceClient.SourceClient().
String alma.acs.container.ContainerServicesBase.getName | ( | ) |
Delivers the unique instance name for the component. The name must have been specified at deployment time in the CDB (for static components like the famous "LAMP1" example), or must have been given to the manager at runtime by the client who creates a dynamic component (or was invented by the manager if none was given).
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by alma.acs.container.ContainerServicesProxy.getName(), alma.acs.monitoring.blobber.BlobberWorker.initWorker(), alma.contLogTest.TestLogLevelsCompImpl.TestLogLevelsCompImpl.name(), alma.lifecycleTest.TestLifeCycleCompImpl.TestLifeCycleCompImpl.name(), alma.demo.HelloDemoImpl.HelloDemoImpl.name(), alma.COUNTER.CounterSupplierImpl.CounterSupplierImpl.name(), alma.COUNTER.CounterConsumerImpl.CounterConsumerImpl.name(), alma.acs.nc.SimpleSupplier.publishEvent(), alma.acs.nc.refactored.NCPublisher.publishEvent(), and alma.acs.nc.ArchiveSupplier.publishEvent().
ThreadFactory alma.acs.container.ContainerServicesBase.getThreadFactory | ( | ) |
Gets a ThreadFactory
, to be used as input for other classes from the concurrent library (such as ThreadPoolExecutor
), or simply to create new Thread
s.
All user-created threads should come from the factory returned here, so "<code>new Thread(...)</code>" should not appear anywhere in component code.
The returned thread factory creates new threads configured to run well in the container environment, e.g.
Implemented in alma.alarmsystem.corbaservice.AlarmSystemContainerServices, alma.acs.container.ContainerServicesImpl, alma.acs.container.ContainerServicesProxy, and alma.acs.container.testsupport.DummyContainerServices.
Referenced by alma.acs.alarmsystem.source.AlarmSourceImpl.AlarmSourceImpl(), alma.ACS.impl.CharacteristicComponentImpl.execute(), alma.acs.monitoring.blobber.BlobberImpl.execute(), alma.acs.alarmsystem.source.AlarmSourceImpl.flushAlarms(), alma.acs.container.ContainerServicesProxy.getThreadFactory(), alma.ACS.MasterComponentImpl.MasterComponentImplBase.initialize(), and alma.acs.monitoring.controller.ControllerImpl.registerKnownCollectors().