Classes | Public Member Functions

com.cosylab.acs.maci.Container Interface Reference

Inheritance diagram for com.cosylab.acs.maci.Container:
com.cosylab.acs.maci.Client com.cosylab.acs.maci.plug.ContainerProxy

List of all members.

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

Detailed Description

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:

  1. Constructs components when the Manager instructs it to (see activate_component and deactivate_component).
  2. Provides the components that it hosts with basic MACI services, such as:
    • access to the Manager
    • access to the Local Database
    • access to other components (indirectly through the Manager)
    • access to the ORB and POA
  3. Handles intricacies of working with the ORB and the POA, such as connecting the newly created components to the POA.
  4. Is responsive to a shutdown directive from the Manager, which can shutdown only the Container's process, or reboot the computer (see shutdown).
Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@

Member Function Documentation

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.

Parameters:
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.
Returns:
Returns the reference to the object that has just been activated. If the Component could not the activated, a nil reference is returned.

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

Parameters:
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.

Parameters:
handles Handles of the components whose information should be retrieved.
Returns:
Information about the selected components.

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.

Parameters:
h handle of the component to be restarted.
Returns:
a new reference of the restarted component.

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.

Parameters:
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.

Parameters:
Action to take after shutting down. Bits 8 through 15 of this parameter denote the action, which can be one of:

  • 0 -- reload the container
  • 1 -- reboot the computer
  • 2 -- exit the container

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


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