Interface TaskAbortStrategy

All Known Implementing Classes:
HttpComponentHttpRequestTaskAbortStrategy, QueryTaskAbortStrategy, TaskRemoveStrategy

public interface TaskAbortStrategy
A strategy to abort a running task.

The abort strategy does not know what sort of task it needs to abort. It is up to the implementation to handle all the logic.

Note, the abort must ensure that all open resources are released in order to avoid deadlocks.

For a common case, think about a HTTP request that needs to be stopped if it takes too long.

Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Invoke the strategy in order to abort the task (that registered this abort strategy).
  • Method Details

    • invoke

      boolean invoke()
      Invoke the strategy in order to abort the task (that registered this abort strategy).
      Returns:
      true if the task has been aborted.