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 CancelHandle NULL
      A null cancel handle which does nothing.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancel​(boolean aggressiveCancelRequested)
      Attempt to cancel the in-progress invocation.
    • Field Detail

      • NULL

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

      • 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