Class InterruptedStatusThread

All Implemented Interfaces:
Runnable

public class InterruptedStatusThread extends GSThread
Common Thread subclass to handle potential loss of interrupted status.
Since:
2.1
Author:
Sun Microsystems, Inc.
  • Constructor Details

    • InterruptedStatusThread

      public InterruptedStatusThread(Runnable target, String name)
      Constructs a new InterruptedStatusThread object.
      Parameters:
      target - the object whose run method is called
      name - the name of the new thread
    • InterruptedStatusThread

      public InterruptedStatusThread(String name)
      Constructs a new InterruptedStatusThread object.
      Parameters:
      name - the name of the new thread
    • InterruptedStatusThread

      public InterruptedStatusThread(ThreadGroup group, Runnable target, String name, long stackSize)
      Constructs a new InterruptedStatusThread object.
      Parameters:
      group - the thread group
      target - the object whose run method is called
      name - the name of the new thread
      stackSize - the desired stack size for the new thread, or zero to indicate that this parameter is to be ignored
  • Method Details

    • interrupt

      public void interrupt()
      Overrides:
      interrupt in class Thread
    • hasBeenInterrupted

      public boolean hasBeenInterrupted()
      Method used to determine if interrupt has been called on this thread.
      Returns:
      returns true if interrupt has been called on this thread, false otherwise.