|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread pt.digitalis.iss.Worker
public final class Worker
This class implements a Worker: a thread entity that executes requests. When the worker is created and started it fetches a request from it's associated ISS and serves and returns the request. The worker will repeat this fetch-serve-return loop while there are requests on the ISS's waiting queue. When the queue is empty the Worker notifies the ISS that it's duty is over and ceases to exist. The class is final so no one can change the way the Worker works (no pun intended). If some changes were made to the Worker by subclassing the ISS might not function properly. The Worker is a private part of the ISS and thus not meant to be extended.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Worker(ISSRequestManagement theManager)
Constructor. |
Method Summary | |
---|---|
void |
run()
Overriding Thread#run()... |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Worker(ISSRequestManagement theManager)
theManager
- the manager that called this WorkerMethod Detail |
---|
public void run()
run
in interface Runnable
run
in class Thread
Runnable.run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |