Interface InterruptableTask<T>

Type Parameters:
T - type of value returned by task
All Superinterfaces:
Callable<T>, Runnable
All Known Implementing Classes:
Http1Connection, Http2Connection

public interface InterruptableTask<T> extends Runnable, Callable<T>
An interruptable task that can implements both Runnable and Callable.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    default T
     
    boolean
    Signals if a task can be interrupted at the time this method is called.
    default void
    run()
     
  • Method Details Link icon

    • canInterrupt Link icon

      boolean canInterrupt()
      Signals if a task can be interrupted at the time this method is called.
      Returns:
      outcome of interruptable test
    • run Link icon

      default void run()
      Specified by:
      run in interface Runnable
    • call Link icon

      default T call() throws Exception
      Specified by:
      call in interface Callable<T>
      Throws:
      Exception