de.jiac.micro.internal.core
Class AbstractNode

java.lang.Object
  extended by de.jiac.micro.internal.core.AbstractContainer
      extended by de.jiac.micro.internal.core.AbstractNode
All Implemented Interfaces:
IContainer, ILifecycleAware, INode, IScope.IScopeStateChangeListener

public abstract class AbstractNode
extends AbstractContainer
implements INode, IScope.IScopeStateChangeListener

Version:
$Revision$
Author:
Erdene-Ochir Tuguldur, Marcel Patzlaff

Nested Class Summary
protected static class AbstractNode.ComponentContext
           
 
Field Summary
 
Fields inherited from class de.jiac.micro.internal.core.AbstractContainer
handles
 
Constructor Summary
protected AbstractNode()
           
 
Method Summary
protected  void addNodeComponent(AbstractNodeComponent nodeComponent)
           
 void cleanup()
          This method is invoked once immediately before the current instance is disposed.
protected  void cleanupComponent(AbstractNode.ComponentContext context)
           
protected abstract  com.github.libxjava.lang.IClassLoader getClassLoaderForAgent(String[] classPath)
           
 void initialise()
          This method is invoked after the current instance is fully configured.
protected  void initialiseComponent(AbstractNode.ComponentContext context)
           
 void onPause(IScope scope)
           
 void onSetup(IScope scope)
           
 void onStart(IScope scope)
           
 void onTerminate(IScope scope)
           
protected  void removeNodeComponent(AbstractNodeComponent nodeComponent)
           
 void setNodeComponents(AbstractNodeComponent[] nodeComponents)
           
 void start()
          Start routines like thread or schedulable activation should be done in this method.
protected  void startComponent(AbstractNode.ComponentContext context)
           
 void stop()
          Implementations should ensure that all threads and schedulables of the current instance are stopped when this method returns.
protected  void stopComponent(AbstractNode.ComponentContext context)
           
 
Methods inherited from class de.jiac.micro.internal.core.AbstractContainer
addHandle, getClassLoader, getDisplayName, getHandle, getLogger, getLogger, removeHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jiac.micro.core.IContainer
addHandle, getClassLoader, getHandle, getLogger, getLogger, removeHandle
 

Constructor Detail

AbstractNode

protected AbstractNode()
Method Detail

setNodeComponents

public void setNodeComponents(AbstractNodeComponent[] nodeComponents)

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
Specified by:
initialise in class AbstractContainer

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
Specified by:
start in class AbstractContainer

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
Specified by:
stop in class AbstractContainer

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
Specified by:
cleanup in class AbstractContainer

getClassLoaderForAgent

protected abstract com.github.libxjava.lang.IClassLoader getClassLoaderForAgent(String[] classPath)

addNodeComponent

protected void addNodeComponent(AbstractNodeComponent nodeComponent)

removeNodeComponent

protected void removeNodeComponent(AbstractNodeComponent nodeComponent)

initialiseComponent

protected void initialiseComponent(AbstractNode.ComponentContext context)

startComponent

protected void startComponent(AbstractNode.ComponentContext context)

stopComponent

protected void stopComponent(AbstractNode.ComponentContext context)

cleanupComponent

protected void cleanupComponent(AbstractNode.ComponentContext context)

onSetup

public void onSetup(IScope scope)
Specified by:
onSetup in interface IScope.IScopeStateChangeListener

onStart

public void onStart(IScope scope)
Specified by:
onStart in interface IScope.IScopeStateChangeListener

onTerminate

public void onTerminate(IScope scope)
Specified by:
onTerminate in interface IScope.IScopeStateChangeListener

onPause

public void onPause(IScope scope)
Specified by:
onPause in interface IScope.IScopeStateChangeListener


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