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

    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

    • canInterrupt

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

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

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