|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread jarol.TimeTrigger
public class TimeTrigger
TimeTrigger is a periodic signal that provides timing.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TimeTrigger(int period)
Allocates a new TimeTrigger with the given period. |
|
TimeTrigger(int period,
boolean debug)
Allocates a new TimeTrigger with the given period and the debug flag. |
Method Summary | |
---|---|
void |
await()
Causes the calling task to be suspended until the period is finished. |
int |
getPeriod()
Returns the current period. |
void |
run()
Performs the sleeping and waking up. |
void |
setPeriod(int period)
Sets the period in milliseconds. |
void |
stopExecution()
Stops the execution of the thread. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeTrigger(int period)
period
- - The period in milliseconds.public TimeTrigger(int period, boolean debug)
period
- - The period in milliseconds.debug
- - Print debug information.Method Detail |
---|
public void await() throws AwaitDuringSignalingException
await
in interface TimeTriggerInterface
AwaitDuringSignalingException
public void setPeriod(int period)
setPeriod
in interface TimeTriggerInterface
period
- - The period in milliseconds.public int getPeriod()
getPeriod
in interface TimeTriggerInterface
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopExecution()
stopExecution
in interface TimeTriggerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |