Class WorkerThread

java.lang.Object
com.iizix.server.WorkerThread
All Implemented Interfaces:
Runnable

public final class WorkerThread extends Object implements Runnable
A worker thread class for the server.
Author:
Christopher Mindus
  • Constructor Details

    • WorkerThread

      public WorkerThread(Worker worker, Runnable disposeRunnable)
      Constructs the worker thread.
      Parameters:
      worker - The worker.
      disposeRunnable - Runnable that is called when the thread exits due to failure.
      Throws:
      NullPointerException - if
  • Method Details

    • isRunning

      public boolean isRunning()
      Verifies if the thread is running.
      Returns:
      The running state.
    • awaitExit

      public void awaitExit()
      Waits max 30 seconds for worker thread to exit.
    • run

      public void run()
      The worker thread runnable.
      Specified by:
      run in interface Runnable