ch.tatool.app.service.exec.impl
Class ExecutorImpl

java.lang.Object
  extended by ch.tatool.app.service.exec.impl.ExecutorImpl
All Implemented Interfaces:
Executor

public class ExecutorImpl
extends Object
implements Executor

Executor implementation

Author:
Michael Ruflin

Constructor Summary
ExecutorImpl()
          Constructor.
 
Method Summary
 void execute(boolean blockCallerThread)
          Starts a module.
 Element getActiveElement()
           
 Executable getActiveExecutable()
           
 ExecutionStrategy getExecutionStrategy()
          Get the selector strategy.
 ElementTree getExecutionTree()
          Get the execution tree this executor works on.
 PhaseRunnableManager getPhaseRunnableManager()
          Get the manager that holds the PhaseExecutables.
 void setExecutionStrategy(ExecutionStrategy selectorStrategy)
          Set the selector strategy.
 void setup(Module module)
           
 void stopCurrentElementExecution()
          Finishes the execution of the current executable
 void stopExecution()
          Stops the current execution when called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutorImpl

public ExecutorImpl()
Constructor.

Method Detail

setup

public void setup(Module module)

execute

public void execute(boolean blockCallerThread)
Starts a module. Merely creates the ExecutionContext and the module execution thread. See runModule for the actual module execution code


setExecutionStrategy

public void setExecutionStrategy(ExecutionStrategy selectorStrategy)
Set the selector strategy.

Specified by:
setExecutionStrategy in interface Executor

getExecutionStrategy

public ExecutionStrategy getExecutionStrategy()
Get the selector strategy.

Specified by:
getExecutionStrategy in interface Executor

stopCurrentElementExecution

public void stopCurrentElementExecution()
Finishes the execution of the current executable

Specified by:
stopCurrentElementExecution in interface Executor

stopExecution

public void stopExecution()
Stops the current execution when called.

Specified by:
stopExecution in interface Executor

getPhaseRunnableManager

public PhaseRunnableManager getPhaseRunnableManager()
Get the manager that holds the PhaseExecutables. Contrary to ExecutableElements, a PhaseRunnable is run by the executor directly without firing any events before or after execution. It can be used to pause the executor or do other quick work in between elements.

Specified by:
getPhaseRunnableManager in interface Executor

getExecutionTree

public ElementTree getExecutionTree()
Get the execution tree this executor works on.

Specified by:
getExecutionTree in interface Executor

getActiveElement

public Element getActiveElement()

getActiveExecutable

public Executable getActiveExecutable()


Copyright © 2012. All Rights Reserved.