ch.tatool.core.element.handler.timeout
Class DefaultTimeoutHandler
java.lang.Object
ch.tatool.core.element.AbstractPropertyHolder
ch.tatool.core.element.NodeImpl
ch.tatool.core.element.handler.timeout.DefaultTimeoutHandler
- All Implemented Interfaces:
- TimeoutHandler, PropertyHolder, Node, ExecutionPhaseListener
public class DefaultTimeoutHandler
- extends NodeImpl
- implements ExecutionPhaseListener, TimeoutHandler
Aspect that provides task timeout capability.
This aspect only makes sense when attached to a task.
- Author:
- Michael Ruflin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
DefaultTimeoutHandler
public DefaultTimeoutHandler()
startTimeout
public void startTimeout(ExecutionContext context)
- Starts the timer.
- Specified by:
startTimeout in interface TimeoutHandler
cancelTimeout
public void cancelTimeout()
- Cancels the timeout.
- Specified by:
cancelTimeout in interface TimeoutHandler
timerElapsed
protected void timerElapsed()
getTimerStartTimestamp
protected long getTimerStartTimestamp()
processExecutionPhase
public void processExecutionPhase(ExecutionContext context)
- Specified by:
processExecutionPhase in interface ExecutionPhaseListener
getTimer
protected Timer getTimer()
isLogTrialProperties
public boolean isLogTrialProperties()
setLogTrialProperties
public void setLogTrialProperties(boolean logTrialProperties)
- Set whether timeout information should be logged in the trial.
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.