Public Member Functions

alma.acs.container.ContainerServicesBase Interface Reference

Inheritance diagram for alma.acs.container.ContainerServicesBase:
alma.acs.container.ContainerServices alma.alarmsystem.corbaservice.AlarmSystemContainerServices com.cosylab.acs.maci.manager.app.ManagerContainerServices alma.acs.container.ContainerServicesImpl alma.acs.container.ContainerServicesProxy alma.acs.container.testsupport.DummyContainerServices

List of all members.

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 ()

Detailed Description

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

Author:
hsommer

Member Function Documentation

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.

Parameters:
cbServant the CORBA-generated servant, e.g. CBdoublePOA; must implement alma.ACS.OffShootOperations.
Returns:
The corba-activated offshoot object, which needs a narrow-cast to the subtype, like CBdouble myCBdouble = alma.ACS.CBdoubleHelper.narrow(...).
Exceptions:
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

Parameters:
offshootImpl the offshoot object implementation
Exceptions:
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().

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.

Returns:
Logger

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 (  ) 
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 Threads.

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.

  • all threads are daeemon threads so that they can't interfere with container shutdown.
  • the priority is the same as that of the calling component thread (which is created by the ORB)
  • uncaught user exceptions are logged as WARNING before the thread terminates.
  • when a component is removed from the container, surviving user threads created by that component are killed using Thread#stop() (which even though deprecated, seems like the perfect choice in this particular situation). Otherwise a faulty components could permanently take away resources from a running container and from the other components.
Returns:
the thread factory to be used by the component to create new threads.

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().


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties