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 void
exec()
java.lang.Runnable
getHookToExecutePriorToInterruption()
java.lang.Object
getReason()
java.lang.Thread
getThreadToBeInterrupted()
boolean
isFinished()
boolean
isTriggered()
java.lang.String
toString()
-
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:
exec
in classTrackableTimerTask
-
isTriggered
public boolean isTriggered()
-
getReason
public java.lang.Object getReason()
-
isFinished
public boolean isFinished()
- Overrides:
isFinished
in classTrackableTimerTask
-
toString
public java.lang.String toString()
- Overrides:
toString
in classANamedTimerTask
-
-