Package com.iizix.server
Class WorkerThread
- java.lang.Object
- com.iizix.server.WorkerThread
- All Implemented Interfaces:
java.lang.Runnable
public class WorkerThread extends java.lang.Object implements java.lang.Runnable
A worker thread class for the server.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description WorkerThread(Worker worker, java.lang.Runnable disposeRunnable)
Constructs the worker thread.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitExit()
Waits max 30 seconds for worker thread to exit.boolean
isRunning()
Verifies if the thread is running.void
run()
The worker thread runnable.
Constructor Detail
WorkerThread
public WorkerThread(Worker worker, java.lang.Runnable disposeRunnable)
Constructs the worker thread.- Parameters:
worker
- The worker.disposeRunnable
- Runnable that is called when the thread exits dur to failure.