Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Worker(WorkerFactory factory,
ErraiService svc)
Initializes the thread with the specified ThreadGroup, factory and service
|
Modifier and Type | Method and Description |
---|---|
static void |
deliverToBus(MessageBus bus,
Message message) |
boolean |
isStopped() |
boolean |
isValid()
Returns true if this thread is valid, and hasn't expired
|
void |
run()
Runs the thread, setting the expiry time, and sends the messages associated with this thread
|
void |
setActive(boolean active)
Sets the Worker to an active or inactive state
|
void |
timeoutInterrupt()
Interrupts this worker thread, and expire it due to a timeout.
|
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, yield
public Worker(WorkerFactory factory, ErraiService svc)
factory
- - the factory this worker thread will belong tosvc
- - the service the thread is attached topublic void setActive(boolean active)
active
- - true if the thread should be activepublic boolean isValid()
public void timeoutInterrupt()
public void run()
public static void deliverToBus(MessageBus bus, Message message)
public boolean isStopped()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.