|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
suramadu.util.exec.PeriodicJavaThread
Simulates the periodic capabilities of a RealtimeThread and a NoHeapRealtimeThread in the RTSJ. It allows both the period and the priority to be set.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
PeriodicJavaThread(java.lang.Runnable r)
Creates a new instance of PeriodicJavaThread with the specified Runnable. |
|
PeriodicJavaThread(java.lang.Runnable r,
int iterations)
Creates a new instance of PeriodicJavaThread with the specified Runnable and iteration count. |
|
PeriodicJavaThread(java.lang.Runnable r,
long period)
Creates a new instance of PeriodicJavaThread with the specified Runnable and period. |
|
PeriodicJavaThread(java.lang.Runnable r,
long period,
int iterations)
Creates a new instance of PeriodicJavaThread with the specified Runnable, period and iterations. |
|
PeriodicJavaThread(java.lang.Runnable r,
long delay,
long period)
Creates a new instance of PeriodicJavaThread with the specified Runnable, initial delay, and period. |
|
PeriodicJavaThread(java.lang.Runnable r,
long delay,
long period,
int iterations)
Creates a new instance of PeriodicJavaThread with the specified Runnable, initial delay, and period and iterations. |
Method Summary | |
void |
kill()
Cancels this PeriodicJavaThread by calling its task's cancel() method. |
void |
run()
The run() method for Runnable |
void |
setDelay(long delay)
Allows after-construction of the initial delay and period of the thread. |
void |
setPeriod(long period)
Allows after-construction of the period of the thread. |
void |
start()
Overloads Thread.start(). |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PeriodicJavaThread(java.lang.Runnable r)
r
- The Runnable to execute periodically.public PeriodicJavaThread(java.lang.Runnable r, long period)
r
- the Runnable to execute periodically.period
- the period (specified in milliseconds) in which to run.public PeriodicJavaThread(java.lang.Runnable r, long delay, long period)
r
- the Runnable to execute periodically.delay
- initial delay before the first period (specified in milliseconds).period
- the period (specified in milliseconds) in which to run.public PeriodicJavaThread(java.lang.Runnable r, int iterations)
r
- The Runnable to execute periodically.iterations
- The number of times to repeat a periodic thread.public PeriodicJavaThread(java.lang.Runnable r, long period, int iterations)
r
- the Runnable to execute periodically.period
- the period (specified in milliseconds) in which to run.iterations
- The number of times to repeat a periodic thread.public PeriodicJavaThread(java.lang.Runnable r, long delay, long period, int iterations)
r
- the Runnable to execute periodically.delay
- initial delay before the first period (specified in milliseconds).period
- the period (specified in milliseconds) in which to run.iterations
- The number of times to repeat a periodic thread.Method Detail |
public void setPeriod(long period)
period
- the period (specified in milliseconds) in which to run.public void setDelay(long delay)
delay
- initial delay before the first period (specified in milliseconds).public void kill()
public void start()
Thread.start()
public void run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |