Class ThreadPool.ServiceThread

java.lang.Object
java.lang.Thread
jadex.concurrent.ThreadPool.ServiceThread
All Implemented Interfaces:
Runnable
Enclosing class:
ThreadPool

public class ThreadPool.ServiceThread extends Thread
A service thread executes tasks.
  • Field Details

    • task

      protected Runnable task
      The actual task.
    • terminated

      protected boolean terminated
    • notified

      protected boolean notified
  • Constructor Details

    • ServiceThread

      public ServiceThread()
      Create a new thread.
  • Method Details

    • run

      public void run()
      Dequeue an element from the queue and execute it.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • markParked

      protected void markParked()
      (method "park" already exists in android - do not overwrite)
    • markUnpark

      protected void markUnpark()
      (method "unpark" already exists in android - do not overwrite)
    • remove

      protected void remove()
      Remove the service thread from the pool.
    • getTask

      public Runnable getTask()
      Get the runnable (the task).
      Returns:
      The runnable.
    • toString

      public String toString()
      Get the string representation.
      Overrides:
      toString in class Thread