|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.tatool.core.element.AbstractPropertyHolder
ch.tatool.core.element.NodeImpl
ch.tatool.core.executable.BlockingExecutable
public abstract class BlockingExecutable
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.
| Constructor Summary | |
|---|---|
BlockingExecutable()
|
|
BlockingExecutable(String defaultId)
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the task. |
protected void |
cancelExecution()
Called when cancel successfully acquires the finish execution lock. |
boolean |
dispatchKeyEvent(KeyEvent e)
|
void |
execute()
Implementation of execute. |
protected void |
finishExecution()
Call this method to finish execution. |
ExecutionContext |
getExecutionContext()
|
protected boolean |
getFinishExecutionLock()
Request the lock to finish execution. |
void |
setExecutionContext(ExecutionContext executionContext)
|
protected abstract void |
startExecution()
Start actual execution. |
| 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.Node |
|---|
getParent, setParent |
| Methods inherited from interface ch.tatool.data.PropertyHolder |
|---|
clearProperties, getId, getKeys, getProperty, removeProperty, setProperty |
| Constructor Detail |
|---|
public BlockingExecutable()
public BlockingExecutable(String defaultId)
| Method Detail |
|---|
public ExecutionContext getExecutionContext()
public void setExecutionContext(ExecutionContext executionContext)
setExecutionContext in interface Executablepublic final void execute()
execute in interface Executableprotected abstract void startExecution()
protected boolean getFinishExecutionLock()
protected void finishExecution()
public void cancel()
cancel in interface Executableprotected void cancelExecution()
public boolean dispatchKeyEvent(KeyEvent e)
dispatchKeyEvent in interface KeyEventDispatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||