Class Cancellation


  • public class Cancellation
    extends java.lang.Object
    The result of a check for a pending cancellation request.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> getReason()
      If cancellation has been requested (i.e.
      boolean isCancelled()
      Returns true if cancellation has been requested, false otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isCancelled

        public boolean isCancelled()
        Returns true if cancellation has been requested, false otherwise.
      • getReason

        public java.util.Optional<java.lang.String> getReason()
        If cancellation has been requested (i.e. if isCancelled() is true), returns the reason of the cancellation as provided by the user. Otherwise, an empty Optional is returned.