de.jiac.micro.core
Interface ILifecycleAware

All Known Implementing Classes:
AbstractActiveBehaviour, AbstractAgent, AbstractContainer, AbstractNode, AbstractNodeComponent, AbstractReactiveBehaviour

public interface ILifecycleAware

This interface should be implemented by node components and agent elements to notify their container of lifecycle awareness. If implemented, the initialisation and activation phases are ensured via the core lifecycle handler.

Version:
$Revision$
Author:
Marcel Patzlaff

Method Summary
 void cleanup()
          This method is invoked once immediately before the current instance is disposed.
 void initialise()
          This method is invoked after the current instance is fully configured.
 void start()
          Start routines like thread or schedulable activation should be done in this method.
 void stop()
          Implementations should ensure that all threads and schedulables of the current instance are stopped when this method returns.
 

Method Detail

initialise

void initialise()
This method is invoked after the current instance is fully configured. It is safe to acquire system resources or handles here. Nevertheless container handles should not be acquired here because the associated handle provider is most likely not intialised yet.

If the current instance is also a handle provider, the handle must be available after this method completes!


start

void start()
Start routines like thread or schedulable activation should be done in this method. It is safe to acquire container handles in this method because each component of the container is fully initialised!


stop

void stop()
Implementations should ensure that all threads and schedulables of the current instance are stopped when this method returns.


cleanup

void cleanup()
This method is invoked once immediately before the current instance is disposed. Implementers have to ensure that every resource that was obtained during the call of initialise() is released!



Copyright © 2008-2011 DAI-Labor. All Rights Reserved.