

Public Member Functions | |
| ManagerContainerServices (ORB orb, POA clientPOA, DAL dal, Logger logger) | |
| OffShoot | activateOffShoot (Servant servant) throws AcsJContainerServicesEx |
| void | deactivateOffShoot (Servant servant) throws AcsJContainerServicesEx |
| void | checkOffShootPOA () throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
| AdvancedContainerServices | getAdvancedContainerServices () |
| DAL | getCDB () |
| synchronized AcsLogger | getLogger () |
| String | getName () |
| ThreadFactory | getThreadFactory () |
| String | corbaObjectToString (org.omg.CORBA.Object objRef) |
| org.omg.CORBA.Object | corbaObjectFromString (String strObjRef) |
| org.omg.CORBA.Any | getAny () |
| ORB | getORB () |
| void | connectManagerAdmin (AdministratorOperations adminOp, boolean retryConnectOnFailure) throws AcsJContainerEx |
| void | disconnectManagerAdmin (AdministratorOperations adminOp) |
Private Member Functions | |
| void | checkOffShootServant (Servant servant) throws AcsJContainerServicesEx |
Private Attributes | |
| final ORB | orb |
| final DAL | dal |
| final Logger | logger |
| AcsLogger | componentLogger |
| final POA | clientPOA |
| POA | offshootPoa |
| Policy[] | offshootPolicies |
| com::cosylab::acs::maci::manager::app::ManagerContainerServices::ManagerContainerServices | ( | ORB | orb, | |
| POA | clientPOA, | |||
| DAL | dal, | |||
| Logger | logger | |||
| ) | [inline] |
| orb | ||
| dal | ||
| logger |
References offshootPoa.
| OffShoot com::cosylab::acs::maci::manager::app::ManagerContainerServices::activateOffShoot | ( | Servant | servant | ) | throws AcsJContainerServicesEx [inline] |
Implements alma::acs::container::ContainerServicesBase.
References checkOffShootPOA(), checkOffShootServant(), getName(), logger, and offshootPoa.
| void com::cosylab::acs::maci::manager::app::ManagerContainerServices::checkOffShootPOA | ( | ) | throws AcsJContainerEx, AcsJUnexpectedExceptionEx [inline] |
Creates the shared offshoot poa on demand
References clientPOA, logger, offshootPoa, offshootPolicies, and alma::JavaContainerError::wrappers::AcsJContainerEx::setContextInfo().
Referenced by activateOffShoot().
| void com::cosylab::acs::maci::manager::app::ManagerContainerServices::checkOffShootServant | ( | Servant | servant | ) | throws AcsJContainerServicesEx [inline, private] |
| cbServant |
| ContainerException |
References logger, alma::JavaContainerError::wrappers::AcsJContainerServicesEx::setContextInfo(), alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameter(), and alma::ACSErrTypeCommon::wrappers::AcsJBadParameterEx::setParameterValue().
Referenced by activateOffShoot(), and deactivateOffShoot().
| void com::cosylab::acs::maci::manager::app::ManagerContainerServices::connectManagerAdmin | ( | AdministratorOperations | adminOp, | |
| boolean | retryConnectOnFailure | |||
| ) | throws AcsJContainerEx [inline] |
Allows to connect a manager admin object to the manager, to receive notifications etc.
In the current implementation every call to this method establishes a new connection to the manager. Should a client ever need to call this method more than once, it must also call disconnectManagerAdmin(String) for each of its admin objects.
This method accepts and distinguishes AdministratorOperations objects and the subtyped SynchronousAdministratorOperations objects.
| adminOp | callback object | |
| retryConnectOnFailure | retry if the manager is not available or the connection failed. |
| AcsJContainerEx |
Implements alma::acs::container::AdvancedContainerServices.
| org.omg.CORBA.Object com::cosylab::acs::maci::manager::app::ManagerContainerServices::corbaObjectFromString | ( | String | strObjRef | ) | [inline] |
Encapsulates org.omg.CORBA.ORB#string_to_object(String).
| strObjRef |
Implements alma::acs::container::AdvancedContainerServices.
| String com::cosylab::acs::maci::manager::app::ManagerContainerServices::corbaObjectToString | ( | org.omg.CORBA.Object | objRef | ) | [inline] |
Encapsulates org.omg.CORBA.ORB#object_to_string(org.omg.CORBA.Object).
| objRef | the corba stub |
objRef. Implements alma::acs::container::AdvancedContainerServices.
| void com::cosylab::acs::maci::manager::app::ManagerContainerServices::deactivateOffShoot | ( | Servant | cbServant | ) | throws AcsJContainerServicesEx [inline] |
Deactivates the offshoot corba object. 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
| cbServant | must implement alma.ACS.OffShootOperations. |
| AcsJContainerServicesEx | if something goes wrong, e.g., if the offshoot servant was not active. |
Implements alma::acs::container::ContainerServicesBase.
References checkOffShootServant(), logger, offshootPoa, and alma::JavaContainerError::wrappers::AcsJContainerServicesEx::setContextInfo().
| void com::cosylab::acs::maci::manager::app::ManagerContainerServices::disconnectManagerAdmin | ( | AdministratorOperations | adminOp | ) | [inline] |
Releases a previously connected manager admin object. This call is ignored if the given object is not connected.
| componentUrl |
Implements alma::acs::container::AdvancedContainerServices.
| AdvancedContainerServices com::cosylab::acs::maci::manager::app::ManagerContainerServices::getAdvancedContainerServices | ( | ) | [inline] |
More specialized methods are available from the AdvancedContainerServices.
Implements alma::acs::container::ContainerServicesBase.
| org.omg.CORBA.Any com::cosylab::acs::maci::manager::app::ManagerContainerServices::getAny | ( | ) | [inline] |
Returns a reference to a new CORBA Any. In Java the only way to do this is through the ORB itself (i.e., the create_any method).
| NullPointerException | if the Any object could not be created. |
Implements alma::acs::container::AdvancedContainerServices.
| DAL com::cosylab::acs::maci::manager::app::ManagerContainerServices::getCDB | ( | ) | [inline] |
Gets a component specified by its instance name. Delegates to get_component.
This method is necessarily generic and will require a cast to the requested interface, like in HelloComponent helloComp = HelloComponentHelper.narrow(containerServices.getComponent("HELLOCOMP1"));.
the more general method get_service offered by the manager is deliberately not represented here. It would currently (Oct.03) offer access to "LogFactory", "NotifyEventChannelFactory", "ArchivingChannel", "LoggingChannel", "InterfaceRepository", "CDB", "ACSLogSvc", "PDB"; It seems that if such access is needed, specialized methods should be added to this interface, like getCDB().
if requested, we may come up with some additional way (e.g. a code-generated singleton class) to give type safe access to other components, like done with EJB xxxHome.
| componentUrl | the ACS CURL of the deployed component instance. |
| AcsJContainerServicesEx | if something goes wrong. Gets a non-sticky reference to a component. This is typically used by "weak clients" such as graphical user interfaces that only want to observe the running system without interfering with its functioning. |
A non-sticky reference does not bind the Manager to keep alive the Component, and the Client requesting a non-sticky reference is not considered when checking for reference counts. The non-sticky reference should not be released, as that call will fail. The Manager can deactivate Components independently of any non-sticky reference. Since a non-sticky reference is not considered in reference counting, it will also not activate the component if it is not already active. As a consequence, asking for a non-sticky reference to a not-active Component throws an exception. The client represented by id (the handle) must have adequate access rights to access the component.
| curl | the component URL (component instance name) |
| AcsJContainerServicesEx | if something goes wrong |
IDL:alma/PS/PowerSupply:1.0. A default instance for the given type must have been declared beforehand (either statically in the CDB config files, or dynamically), otherwise an exception is thrown.
To get more information on the returned component, call getComponentDescriptor with the instance name that you can get from the component using alma.ACS.ACSComponentOperations#name.
Delegates to si.ijs.maci.ManagerOperations#get_default_component.
| componentIDLType |
| AcsJContainerServicesEx | Gets a component that will run collocated with a given component. |
| compUrl | the component's name (URL) | |
| targetCompUrl | the name (URL) of the target component, in whose container we also want compUrl to run. |
| AcsJContainerServicesEx | If the call failed and no component reference could be obtained. |
| compSpec | the description of the component to be created | |
| markAsDefaul | if true, the new component will become the default component for its IDL type. | |
| targetCompUrl | targetCompUrl the name (URL) of the target component, in whose container we also want compUrl to run. |
| AcsJContainerServicesEx | If the call failed and no component reference could be obtained. |
The fields of compSpec can be filled in at various levels of detail, allowing the manager to blend in missing data from static deployment information. For a detailed description of the various options, please refer to the ACS documentation.
To get more information on the returned component, call getComponentDescriptor with the instance name that you've specified or that you can get from the component in case it was assigned (see alma.ACS.ACSComponentOperations#name()).
Delegates to si.ijs.maci.ManagerOperations#get_dynamic_component.
| compSpec | the description of the component to be created | |
| markAsDefault | if true, the new component will become the default component for its IDL type. More powerful and thus more dangerous version of getDynamicComponent(ComponentQueryDescriptor, boolean) which exposes a CORBA struct directly. | |
| compSpec | the description of the component to be created | |
| markAsDefault | if true, the new component will become the default component for its IDL type. |
component_name or component_type, but also the more advanced values component_code or container_name, please send a request to ACS so that access to these fields be included in the ComponentQueryDescriptor given to the recommended version of this method. 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 dal.
| synchronized AcsLogger com::cosylab::acs::maci::manager::app::ManagerContainerServices::getLogger | ( | ) | [inline] |
Delivers the ComponentStateManager object through which the component and the container administrate the state of the component.
The component needs to access the ComponentStateManager if it wishes to change its state. If it doesn't, only the container will change the state based on the information it has available.
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.
References componentLogger, and getName().
| String com::cosylab::acs::maci::manager::app::ManagerContainerServices::getName | ( | ) | [inline] |
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.
Referenced by activateOffShoot(), and getLogger().
| ORB com::cosylab::acs::maci::manager::app::ManagerContainerServices::getORB | ( | ) | [inline] |
Provides explicit access to the normally invisible ORB, for components that fulfill infrastructural tasks.
Normal subsystem components must not use this method! If they feel they should get access to the ORB, either ACS is missing a feature which should be reported, or there is a misunderstanding in how to develop software for Alma.
Implements alma::acs::container::AdvancedContainerServices.
References orb.
| ThreadFactory com::cosylab::acs::maci::manager::app::ManagerContainerServices::getThreadFactory | ( | ) | [inline] |
Creates a unique id and sets it on the given (binding class) entity object. The id will be redundantly stored in an encrypted format so that later it can be verified that the id is indeed the one originally assigned.
| entity | must be freshly created and Converts a "flat-XML" component interface (as obtained from the various getComponent methods) to a "transparent-XML" component interface. This is only applicable to components that contain XML entities in their IDL interface methods, and for which the build process has been set up to generate XML binding classes and the "transparent-XML" interface in addition to the standard Java-IDL compiler output. |
The container can fulfill this request in two different ways:
flatXmlIF) and the corresponding Java binding classes (in transparentXmlIF). In either case, the returned Object implements the transparentXmlIF interface. The client component that calls this method should only cast to that interface, and does not need to know which of the two transport mechanisms are being used.
| transparentXmlIF | component interface with XML binding classes. | |
| componentReference | reference to the component to be wrapped, as obtained through getComponent(String), thus implements flatXmlIF. | |
| flatXmlIF | component interface where entity objects are represented as serialized XML inside a CORBA struct. |
transparentXmlIF. 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.
Implements alma::acs::container::ContainerServicesBase.
final POA com::cosylab::acs::maci::manager::app::ManagerContainerServices::clientPOA [private] |
Referenced by checkOffShootPOA().
AcsLogger com::cosylab::acs::maci::manager::app::ManagerContainerServices::componentLogger [private] |
Referenced by getLogger().
Referenced by getCDB().
final Logger com::cosylab::acs::maci::manager::app::ManagerContainerServices::logger [private] |
Referenced by activateOffShoot(), checkOffShootPOA(), deactivateOffShoot(), and ManagerContainerServices().
Policy [] com::cosylab::acs::maci::manager::app::ManagerContainerServices::offshootPolicies [private] |
Referenced by checkOffShootPOA().
final ORB com::cosylab::acs::maci::manager::app::ManagerContainerServices::orb [private] |
Referenced by corbaObjectFromString(), corbaObjectToString(), getAny(), and getORB().
1.6.2