Interface CancelHandle

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CancelHandle
A handle which may be used to request the cancellation an invocation request. A cancel request may or may not be honored by the server implementation.
Author:
David M. Lloyd
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CancelHandle
    A null cancel handle which does nothing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancel(boolean aggressiveCancelRequested)
    Attempt to cancel the in-progress invocation.
  • Field Details

    • NULL

      static final CancelHandle NULL
      A null cancel handle which does nothing.
  • Method Details

    • cancel

      void cancel(boolean aggressiveCancelRequested)
      Attempt to cancel the in-progress invocation. If the invocation is past the point where cancellation is possible, the method has no effect. The invocation may not support cancellation, in which case the method has no effect.
      Parameters:
      aggressiveCancelRequested - false to only cancel if the method invocation has not yet begun, true to attempt to cancel even if the method is running