Classes | |
interface | ComponentInfoCompletionCallback |
Public Member Functions | |
ComponentInfo | activate_component (int handle, long executionId, String name, String exe, String type) throws AcsJCannotActivateComponentEx |
void | activate_component_async (int handle, long executionId, String name, String exe, String type, ComponentInfoCompletionCallback callback) |
void | deactivate_component (int handle) throws AcsJCannotDeactivateComponentEx,AcsJComponentDeactivationUncleanEx, AcsJComponentDeactivationFailedEx |
ComponentInfo[] | get_component_info (int[] handles) throws RemoteException |
Component | restart_component (int handle) throws RemoteException |
void | shutdown (int action) throws RemoteException |
void | set_component_shutdown_order (int[] handles) throws RemoteException |
Container is an agent of MACI that is installed on every computer of the control system. There can be more than one Container living on the same computer, but there can be only one Container per process. It has the following responsibilities:
ComponentInfo com.cosylab.acs.maci.Container.activate_component | ( | int | handle, | |
long | executionId, | |||
String | name, | |||
String | exe, | |||
String | type | |||
) | throws AcsJCannotActivateComponentEx |
Activate a Component whose type (class) and name (instance) are given.
In the process of activation, Component's code-base is loaded into memory if it is not there already. The code-base resides in an executable file (usually a dynamic-link library or a shared library -- DLL).
On platforms that do not automatically load dependent executables (e.g., VxWorks), the Container identifies the dependancies by querying the executable and loads them automatically.
Once the code is loaded, it is asked to construct a servant of a given type.
The servant is then initialized with the Configuration Database (CDB) and Persistance Database (PDB) data. The servant is attached to the Component, and a reference to it is returned.
handle | Handle of the Component that is being activated. This handle is used by the Component when it will present itself to the Manager. The Component is expected to remember this handle for its entire life-time. | |
executionId | Execution ID. | |
name | Name of the Component to instantiate. | |
exe | Path to the executable file (a DLL or a shared library) in which the Component's code resides. The path is relative to the root directory in which all executable code is stored. The path must not contain dots, and uses slashes (not backslashes) to separate components of the path. The path must not include the extension, or any prefixes, so that it is platform independent. | |
type | The type of the Component to instantiate. The interpretation of this field depends on the executable. Type should uniquely identify the code-base which the Component will be executing. Note: Type name is a CORBA repository ID. |
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.activate_component().
void com.cosylab.acs.maci.Container.activate_component_async | ( | int | handle, | |
long | executionId, | |||
String | name, | |||
String | exe, | |||
String | type, | |||
ComponentInfoCompletionCallback | callback | |||
) |
Asynchronous version of activate_component.
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.activate_component_async().
void com.cosylab.acs.maci.Container.deactivate_component | ( | int | handle | ) | throws AcsJCannotDeactivateComponentEx,AcsJComponentDeactivationUncleanEx, AcsJComponentDeactivationFailedEx |
Deactivate a component whose handles is given.
Deactivation is the inverse process of activation: Component is detached from the POA, and thus made unavailable through CORBA, and its resources are freed. If it's code-base is no longer used, it is unloaded from memory.
handle | A handle identifying a component to be released. |
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.deactivate_component().
ComponentInfo [] com.cosylab.acs.maci.Container.get_component_info | ( | int[] | handles | ) | throws RemoteException |
Returns information about a subset of components that are currently hosted by the Container. Note: If the list of handles is empty, information about all components hosted by the container is returned.
handles | Handles of the components whose information should be retrieved. |
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.get_component_info().
Component com.cosylab.acs.maci.Container.restart_component | ( | int | handle | ) | throws RemoteException |
Restarts a component.
h | handle of the component to be restarted. |
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.restart_component().
void com.cosylab.acs.maci.Container.set_component_shutdown_order | ( | int[] | handles | ) | throws RemoteException |
Set component shutdown order.
handles | ordered list of components handles. |
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.set_component_shutdown_order().
void com.cosylab.acs.maci.Container.shutdown | ( | int | action | ) | throws RemoteException |
Shutdown the Container.
Action | to take after shutting down. Bits 8 through 15 of this parameter denote the action, which can be one of:
|
The bits 0 thru 7 (values 0 to 255) are the return value that the Container will pass to the operating system.
Implemented in com.cosylab.acs.maci.plug.ContainerProxy.
Referenced by com.cosylab.acs.maci.plug.ContainerProxy.shutdown(), and com.cosylab.acs.maci.manager.ManagerImpl.shutdownContainer().