Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::component::ComponentLifecycle Interface Reference

Inheritance diagram for alma::acs::component::ComponentLifecycle:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void initialize (ContainerServices containerServices) throws ComponentLifecycleException
void execute () throws ComponentLifecycleException
void cleanUp ()
void aboutToAbort ()

Detailed Description

Interface that every component has to implement.

The methods are used by the container to start and stop the component, that is, to manage its lifecycle.

Note that the constructor of the component implementation should be very small, preferably empty. Use the methods initialize(ContainerServices) and execute() instead.

TODOs:

Author:
hsommer


Member Function Documentation

void alma::acs::component::ComponentLifecycle::aboutToAbort  ) 
 

Called when due to some error condition the component is about to be forcefully removed some unknown amount of time later (usually not very much...).

The component should make an effort to die as neatly as possible.

Because of its urgency, this method will be called asynchronously to the execution of any other method of the component.

Implemented in alma::acs::component::ComponentImplBase.

void alma::acs::component::ComponentLifecycle::cleanUp  ) 
 

Called after the last functional call to the component has finished. The component should then orderly release resources etc.

Implemented in alma::acs::component::ComponentImplBase.

void alma::acs::component::ComponentLifecycle::execute  )  throws ComponentLifecycleException
 

Called after ComponentLifecycle#initialize(ContainerServices) to tell the component that it has to be ready to accept incoming functional calls any time.

Examples:

  • last-minute initializations for which initialize seemed too early
  • component could start actions which aren't triggered by any functional call, e.g. the Scheduler could start to rank SBs in a separate thread.

Must be implemented as a synchronous (blocking) call (can spawn threads though).

Implemented in alma::acs::component::ComponentImplBase.

void alma::acs::component::ComponentLifecycle::initialize ContainerServices  containerServices  )  throws ComponentLifecycleException
 

Called to give the component time to initialize itself. For instance, the component could retrieve connections, read in configuration files/parameters, build up in-memory tables, ...

Called before execute(). In fact, this method might be called quite some time before functional requests can be sent to the component.

Must be implemented as a synchronous (blocking) call.

Parameters:
containerServices callback object for services provided by the container

Implemented in alma::acs::component::ComponentImplBase.


The documentation for this interface was generated from the following file:
Generated on Thu Apr 30 02:52:15 2009 for ACS Java API by doxygen 1.3.8