Class CustomCancellationToken


  • public class CustomCancellationToken
    extends java.lang.Object
    This is helper class to allow the background script to monitor cancellation requests from the main script (or VU) and signal back that it accepted cancellation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void acceptCancellation()
      This is to be called by the background script when it finished with the current job and accepted the cancellation request.
      void cancel()
      Used to initiate a cancellation request to the background script.
      boolean isCancellationAccepted()
      For internal use only
      boolean isCancellationRequested()
      Function to be regularly checked by the background script inside the loop to see if the cancellation was requested.
      • Methods inherited from class java.lang.Object

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

      • CustomCancellationToken

        public CustomCancellationToken()
    • Method Detail

      • isCancellationRequested

        public boolean isCancellationRequested()
        Function to be regularly checked by the background script inside the loop to see if the cancellation was requested.
        Returns:
        true if cancellation is requested
      • cancel

        public void cancel()
        Used to initiate a cancellation request to the background script.
      • acceptCancellation

        public void acceptCancellation()
        This is to be called by the background script when it finished with the current job and accepted the cancellation request.
      • isCancellationAccepted

        public boolean isCancellationAccepted()
        For internal use only
        Returns:
        For internal use only