Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
AbstractProcessScheduler(int interval)
Default constructor with accepts the time interval as an argument.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isThreadRunning()
This method returns true if the timer thread is running.
|
abstract void |
performThreadTask()
Implement the piece of code to be executed for the scheduled time interval.
|
void |
run() |
void |
runPeriodically()
This method runs the current thread periodically for the provided interval.
|
void |
startThread()
This method starts the scheduler thread.
|
void |
stopTimerThread()
This method stops the scheduled thread.
|
activeCount, checkAccess, clone, 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, yieldpublic AbstractProcessScheduler(int interval)
interval - public void runPeriodically()
public abstract void performThreadTask()
public void stopTimerThread()
public void startThread()
public boolean isThreadRunning()
Copyright © 2021. All rights reserved.