Public Member Functions | |
AlarmSystemContainerServices (AlarmSystemCorbaServer alSysCorbaServer, AcsLogger theLogger) | |
POA | getPOAForOffshoots (POA componentPOA) throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
AdvancedContainerServices | getAdvancedContainerServices () |
AcsLogger | getLogger () |
String | getName () |
ThreadFactory | getThreadFactory () |
DAL | getCDB () throws AcsJContainerServicesEx |
ORB | getOrb () |
void | deactivateOffShoot (Object offshootImpl) throws AcsJContainerServicesEx |
Package Functions | |
public< T extends Servant &OffShootOperations > OffShoot | activateOffShoot (T cbServant) throws AcsJContainerServicesEx |
alma.alarmsystem.corbaservice.AlarmSystemContainerServices.AlarmSystemContainerServices | ( | AlarmSystemCorbaServer | alSysCorbaServer, | |
AcsLogger | theLogger | |||
) |
Constructor
theOrb | The ORB | |
theLogger | The logger |
References alma.acs.alarmsystem.corbaservice.AlarmSystemCorbaServer.getORB().
public<T extends Servant & OffShootOperations> OffShoot alma.alarmsystem.corbaservice.AlarmSystemContainerServices.activateOffShoot | ( | T | cbServant | ) | throws AcsJContainerServicesEx [package] |
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. |
Implements alma.acs.container.ContainerServicesBase.
References alma.alarmsystem.corbaservice.AlarmSystemContainerServices.getPOAForOffshoots(), and alma.acs.alarmsystem.corbaservice.AlarmSystemCorbaServer.getRootPOA().
void alma.alarmsystem.corbaservice.AlarmSystemContainerServices.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. |
Implements alma.acs.container.ContainerServicesBase.
References alma.alarmsystem.corbaservice.AlarmSystemContainerServices.getPOAForOffshoots(), alma.acs.alarmsystem.corbaservice.AlarmSystemCorbaServer.getRootPOA(), and alma.acs.logging.AcsLogger.log().
AdvancedContainerServices alma.alarmsystem.corbaservice.AlarmSystemContainerServices.getAdvancedContainerServices | ( | ) |
More specialized methods are available from the AdvancedContainerServices
.
Implements alma.acs.container.ContainerServicesBase.
DAL alma.alarmsystem.corbaservice.AlarmSystemContainerServices.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 |
Implements alma.acs.container.ContainerServicesBase.
References alma.acs.alarmsystem.corbaservice.AlarmSystemCorbaServer.getServiceFromNameServer(), and alma.acs.logging.AcsLogger.log().
AcsLogger alma.alarmsystem.corbaservice.AlarmSystemContainerServices.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.
Implements alma.acs.container.ContainerServicesBase.
Referenced by alma.alarmsystem.corbaservice.AlarmSystemAdvancedContainerServices.AlarmSystemAdvancedContainerServices().
String alma.alarmsystem.corbaservice.AlarmSystemContainerServices.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).
Implements alma.acs.container.ContainerServicesBase.
ORB alma.alarmsystem.corbaservice.AlarmSystemContainerServices.getOrb | ( | ) |
POA alma.alarmsystem.corbaservice.AlarmSystemContainerServices.getPOAForOffshoots | ( | POA | componentPOA | ) | throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
ThreadFactory alma.alarmsystem.corbaservice.AlarmSystemContainerServices.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.
Implements alma.acs.container.ContainerServicesBase.