Package de.das.encrypter.tools
Class BaseThread
java.lang.Object
java.lang.Thread
de.das.encrypter.tools.BaseThread
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
KeyFilesSearcher,RandomFactorGenerator
Base class for all threads that will perform periodical actions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddoTask()voidfinish()longlongbooleanisKilled()booleanvoidkill()voidprolog()voidrun()voidsetSleepTime(long t) voidsetSleepTimeMax(long t) voidsetSleepTimeMin(long t) Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
threadID
public long threadID
-
-
Constructor Details
-
BaseThread
public BaseThread()
-
-
Method Details
-
getThreadID
public long getThreadID() -
run
public void run() -
doTask
public abstract void doTask() -
prolog
public void prolog() -
finish
public void finish() -
setSleepTime
public void setSleepTime(long t) -
getSleepTime
public long getSleepTime() -
setSleepTimeMin
public void setSleepTimeMin(long t) -
setSleepTimeMax
public void setSleepTimeMax(long t) -
kill
public void kill() -
isKilled
public boolean isKilled() -
isTerminated
public boolean isTerminated()
-