Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected boolean |
debug |
protected boolean |
running |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
AbstractProcessorThread(String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Close the processor.
|
protected void |
debug(String msg) |
protected void |
error(String msg) |
protected void |
error(Throwable t) |
protected org.apache.log4j.Logger |
getLogger() |
boolean |
getRunning() |
boolean |
handleException(Throwable val)
Override to handle certain exception types.
|
protected void |
info(String msg) |
void |
run() |
abstract void |
runInit()
Called to initialise at start of run.
|
abstract void |
runProcess()
Do whatever we're supposed to be doing.
|
void |
setRunning(boolean val)
Set the running flag
|
static boolean |
stopProcess(AbstractProcessorThread proc)
Shut down a running process.
|
protected void |
warn(String msg) |
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 AbstractProcessorThread(String name)
name - for the threadpublic abstract void runInit()
public abstract void runProcess()
throws Throwable
Throwablepublic abstract void close()
public boolean handleException(Throwable val)
val - the exceptionpublic void setRunning(boolean val)
val - the flagpublic boolean getRunning()
public static boolean stopProcess(AbstractProcessorThread proc)
proc - the thread processprotected void info(String msg)
protected void warn(String msg)
protected void debug(String msg)
protected void error(Throwable t)
protected void error(String msg)
protected org.apache.log4j.Logger getLogger()
Copyright © 2018 Bedework. All rights reserved.