Interface AsyncRunnable

All Superinterfaces:
Runnable

public interface AsyncRunnable extends Runnable
A runnable representing a asynchronous event listener.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieve a unique worker ID.
    boolean
    Determine if this runnable has already run its course.
    boolean
    Determine if we're running or not.
    boolean
    Stop the given runnable.

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • getID

      int getID()
      Retrieve a unique worker ID.
      Returns:
      Unique worker ID.
    • stop

      boolean stop() throws InterruptedException
      Stop the given runnable.

      This may not occur right away.

      Returns:
      TRUE if the thread was stopped, FALSE if it was already stopped.
      Throws:
      InterruptedException - if it is interrupted
    • isRunning

      boolean isRunning()
      Determine if we're running or not.
      Returns:
      TRUE if we're running, FALSE otherwise.
    • isFinished

      boolean isFinished()
      Determine if this runnable has already run its course.
      Returns:
      TRUE if it has been stopped, FALSE otherwise.