ch.tatool.core.element.handler.timeout
Class DefaultVisualTimeoutHandler

java.lang.Object
  extended by ch.tatool.core.element.AbstractPropertyHolder
      extended by ch.tatool.core.element.NodeImpl
          extended by ch.tatool.core.element.handler.timeout.DefaultVisualTimeoutHandler
All Implemented Interfaces:
TimeoutHandler, PropertyHolder, Node, ExecutionPhaseListener
Direct Known Subclasses:
DefaultAdaptiveTimeoutHandler

public class DefaultVisualTimeoutHandler
extends NodeImpl
implements ExecutionPhaseListener, TimeoutHandler

Timeout handler that gives the user a visual feedback through the status bar

Author:
Michael Ruflin

Field Summary
protected static LongProperty durationProperty
           
static String PROPERTY_DURATION
           
static String PROPERTY_REACTION_TIME
           
protected static LongProperty reactionTimeProperty
           
protected  Timer timer
          Timer used for the timeout.
 
Constructor Summary
DefaultVisualTimeoutHandler()
           
 
Method Summary
 void cancelTimeout()
           
 long getDefaultTimerDuration()
           
 long getReactionTime()
           
protected  long getTimerStartTimestamp()
           
 void processExecutionPhase(ExecutionContext event)
           
 void setDefaultTimerDuration(long defaultTimerDuration)
           
 void setReactionTime(long reactionTime)
           
 void startTimeout(ExecutionContext context)
           
protected  void timerElapsed()
           
 
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
 

Field Detail

PROPERTY_DURATION

public static final String PROPERTY_DURATION
See Also:
Constant Field Values

PROPERTY_REACTION_TIME

public static final String PROPERTY_REACTION_TIME
See Also:
Constant Field Values

timer

protected Timer timer
Timer used for the timeout.


durationProperty

protected static LongProperty durationProperty

reactionTimeProperty

protected static LongProperty reactionTimeProperty
Constructor Detail

DefaultVisualTimeoutHandler

public DefaultVisualTimeoutHandler()
Method Detail

startTimeout

public void startTimeout(ExecutionContext context)
Specified by:
startTimeout in interface TimeoutHandler

cancelTimeout

public void cancelTimeout()
Specified by:
cancelTimeout in interface TimeoutHandler

timerElapsed

protected void timerElapsed()

processExecutionPhase

public void processExecutionPhase(ExecutionContext event)
Specified by:
processExecutionPhase in interface ExecutionPhaseListener

getTimerStartTimestamp

protected long getTimerStartTimestamp()

getDefaultTimerDuration

public long getDefaultTimerDuration()
Specified by:
getDefaultTimerDuration in interface TimeoutHandler

setDefaultTimerDuration

public void setDefaultTimerDuration(long defaultTimerDuration)
Specified by:
setDefaultTimerDuration in interface TimeoutHandler

getReactionTime

public long getReactionTime()

setReactionTime

public void setReactionTime(long reactionTime)


Copyright © 2012. All Rights Reserved.