ch.tatool.core.executable
Class BlockingAWTExecutable

java.lang.Object
  extended by ch.tatool.core.element.AbstractPropertyHolder
      extended by ch.tatool.core.element.NodeImpl
          extended by ch.tatool.core.executable.BlockingExecutable
              extended by ch.tatool.core.executable.BlockingAWTExecutable
All Implemented Interfaces:
PropertyHolder, Executable, Node, KeyEventDispatcher
Direct Known Subclasses:
AbstractHTMLExecutable, AbstractInstructionExecutable, ConfidenceRatingExecutable, GenericContentExecutable, QuestionnaireExecutable

public abstract class BlockingAWTExecutable
extends BlockingExecutable
implements Executable

Blocking executable element implementation This implementation blocks the executable thread until finishExecution is called. Prior to calling finishExecution, a lock needs to be acquired. This way each thread finishing can first check whether it is "the first" or simply abort its operation in case it is not.

Author:
Michael Ruflin

Constructor Summary
BlockingAWTExecutable()
           
BlockingAWTExecutable(String defaultId)
           
 
Method Summary
protected  void cancelExecution()
          Calls cancelExecutionAWT on the awt thread.
protected  void cancelExecutionAWT()
          cancelExecution called in the awt thread.
protected  void startExecution()
          Calls startExecutionAWT on the awt thread.
protected abstract  void startExecutionAWT()
          To be implemented.
 
Methods inherited from class ch.tatool.core.executable.BlockingExecutable
cancel, dispatchKeyEvent, execute, finishExecution, getExecutionContext, getFinishExecutionLock, setExecutionContext
 
Methods inherited from class ch.tatool.core.element.NodeImpl
assignParent, assignParent, assignParents, getId, getLocalId, getParent, setId, setLocalId, setParent
 
Methods inherited from class ch.tatool.core.element.AbstractPropertyHolder
clearProperties, getKeys, getProperty, removeProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.tatool.element.Executable
cancel, execute, setExecutionContext
 
Methods inherited from interface ch.tatool.element.Node
getParent, setParent
 
Methods inherited from interface ch.tatool.data.PropertyHolder
clearProperties, getId, getKeys, getProperty, removeProperty, setProperty
 

Constructor Detail

BlockingAWTExecutable

public BlockingAWTExecutable()

BlockingAWTExecutable

public BlockingAWTExecutable(String defaultId)
Method Detail

startExecution

protected final void startExecution()
Calls startExecutionAWT on the awt thread.

Specified by:
startExecution in class BlockingExecutable

startExecutionAWT

protected abstract void startExecutionAWT()
To be implemented. Called at the start of the executable execution.


cancelExecution

protected final void cancelExecution()
Calls cancelExecutionAWT on the awt thread.

Overrides:
cancelExecution in class BlockingExecutable

cancelExecutionAWT

protected void cancelExecutionAWT()
cancelExecution called in the awt thread.



Copyright © 2012. All Rights Reserved.