OpenCOM
Interface ILifeCycle

All Known Implementing Classes:
CFMetaInterface

public interface ILifeCycle

Interface implemented by every OpenCOM components. Manages the startup and shutdown of components.


Method Summary
 boolean shutdown()
          Allows a component to take action while it is being deleted.
 boolean startup(java.lang.Object data)
          Allows a component to take action whenever an instance is created.
 

Method Detail

startup

boolean startup(java.lang.Object data)
Allows a component to take action whenever an instance is created. A pointer to the IOCM of the runtime is passed to allow the instance to store it as a member variable, thus allowing convenient access from member methods. This method should be called directly by the programmer after an instance is created. This separation between creation and initialisation is needed because startup() typically invokes receptacle-based intarfaces, which must be connected after a component instance has been created by the runtime, i.e. before startup can be invoked.

Parameters:
data - Any startup data to be passed to the component when it is activated.
Returns:
A boolean indicating the success of the operation
See Also:
IOpenCOM

shutdown

boolean shutdown()
Allows a component to take action while it is being deleted. This method SHOULD NOT be directly called by the programmer but it is called by the OpenCOM runtime when a component it deleted by calling deleteInstance().

Returns:
A boolean indicating the success of the operation