de.jiac.micro.internal.core
Class AbstractNodeComponent

java.lang.Object
  extended by de.jiac.micro.internal.core.AbstractNodeComponent
All Implemented Interfaces:
ILifecycleAware

public abstract class AbstractNodeComponent
extends Object
implements ILifecycleAware

Version:
$Revision$
Author:
Marcel Patzlaff

Constructor Summary
AbstractNodeComponent()
           
 
Method Summary
protected  void addHandlesOn(AgentScope agent)
           
 void cleanup()
          This method is invoked once immediately before the current instance is disposed.
protected  IHandle getNodeHandle()
           
 void initialise()
          This method is invoked after the current instance is fully configured.
protected  void removeHandlesFrom(AgentScope agent)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNodeComponent

public AbstractNodeComponent()
Method Detail

cleanup

public void cleanup()
Description copied from interface: ILifecycleAware
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 ILifecycleAware.initialise() is released!

Specified by:
cleanup in interface ILifecycleAware

initialise

public void initialise()
Description copied from interface: ILifecycleAware
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!

Specified by:
initialise in interface ILifecycleAware

start

public void start()
Description copied from interface: ILifecycleAware
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!

Specified by:
start in interface ILifecycleAware

stop

public void stop()
Description copied from interface: ILifecycleAware
Implementations should ensure that all threads and schedulables of the current instance are stopped when this method returns.

Specified by:
stop in interface ILifecycleAware

getNodeHandle

protected IHandle getNodeHandle()

addHandlesOn

protected void addHandlesOn(AgentScope agent)

removeHandlesFrom

protected void removeHandlesFrom(AgentScope agent)


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