Package ai.libs.jaicore.interrupt
Class InterruptionTimerTask
- java.lang.Object
-
- java.util.TimerTask
-
- ai.libs.jaicore.concurrent.TrackableTimerTask
-
- ai.libs.jaicore.concurrent.ANamedTimerTask
-
- ai.libs.jaicore.interrupt.InterruptionTimerTask
-
- All Implemented Interfaces:
java.lang.Runnable
public class InterruptionTimerTask extends ANamedTimerTask
-
-
Constructor Summary
Constructors Constructor Description InterruptionTimerTask(java.lang.String descriptor)InterruptionTimerTask(java.lang.String descriptor, java.lang.Runnable hookToExecutePriorToInterruption)InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted)InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted, java.lang.Object reason, java.lang.Runnable hookToExecutePriorToInterruption)InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted, java.lang.Runnable hookToExecutePriorToInterruption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexec()java.lang.RunnablegetHookToExecutePriorToInterruption()java.lang.ObjectgetReason()java.lang.ThreadgetThreadToBeInterrupted()booleanisFinished()booleanisTriggered()java.lang.StringtoString()-
Methods inherited from class ai.libs.jaicore.concurrent.ANamedTimerTask
getDescriptor, setDescriptor
-
Methods inherited from class ai.libs.jaicore.concurrent.TrackableTimerTask
cancel, get, getLastExecution, hasBeenExecuted, isCanceled, run
-
-
-
-
Constructor Detail
-
InterruptionTimerTask
public InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted, java.lang.Object reason, java.lang.Runnable hookToExecutePriorToInterruption)
-
InterruptionTimerTask
public InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted, java.lang.Runnable hookToExecutePriorToInterruption)
-
InterruptionTimerTask
public InterruptionTimerTask(java.lang.String descriptor, java.lang.Thread threadToBeInterrupted)
-
InterruptionTimerTask
public InterruptionTimerTask(java.lang.String descriptor, java.lang.Runnable hookToExecutePriorToInterruption)
-
InterruptionTimerTask
public InterruptionTimerTask(java.lang.String descriptor)
-
-
Method Detail
-
getThreadToBeInterrupted
public java.lang.Thread getThreadToBeInterrupted()
-
getHookToExecutePriorToInterruption
public java.lang.Runnable getHookToExecutePriorToInterruption()
-
exec
public void exec()
- Specified by:
execin classTrackableTimerTask
-
isTriggered
public boolean isTriggered()
-
getReason
public java.lang.Object getReason()
-
isFinished
public boolean isFinished()
- Overrides:
isFinishedin classTrackableTimerTask
-
toString
public java.lang.String toString()
- Overrides:
toStringin classANamedTimerTask
-
-