org.kahina.core.behavior
Class KahinaDAGBehavior

java.lang.Object
  extended by org.kahina.core.behavior.KahinaBehavior<KahinaDAG>
      extended by org.kahina.core.behavior.KahinaDAGBehavior
All Implemented Interfaces:
KahinaListener
Direct Known Subclasses:
TulipaDAGBehavior

public class KahinaDAGBehavior
extends KahinaBehavior<KahinaDAG>

The ancestor class of all DAG behavior classes.

A version of KahinaBehavior for defining the application-specific behavior of KahinaDAGs. Implementations usually define the way a DAG is constructed and how it reacts to incoming KahinaEvents. A typical use case is TulipaDAGBehavior for the search space visualization in the TuLiPA parsing system.

In an application, the user will usually want to inherit from this in order to define the behavior of DAG components. By default, each KahinaBehavior implements the KahinaListener interface, but it does not register itself with the event system. For that purpose, implementations should use the KahinaRunner.getControl().registerListener mechanism.


Field Summary
 
Fields inherited from class org.kahina.core.behavior.KahinaBehavior
kahina, object
 
Constructor Summary
KahinaDAGBehavior(KahinaDAG dag, KahinaInstance kahina)
          Class constructor specifying the controlled DAG and the KahinaInstance that it is connected to.
 
Method Summary
 
Methods inherited from class org.kahina.core.behavior.KahinaBehavior
processEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KahinaDAGBehavior

public KahinaDAGBehavior(KahinaDAG dag,
                         KahinaInstance kahina)
Class constructor specifying the controlled DAG and the KahinaInstance that it is connected to.

Parameters:
dag - the KahinaDAG the behavior of which is going to be controlled by the new instance
kahina - the KahinaInstance that this behavior will belong to and communicate with