Class CustomCancellationToken
- java.lang.Object
-
- com.facilita.fc.runtime.backgroundScripting.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.
-
-
Constructor Summary
Constructors Constructor Description CustomCancellationToken()
-
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 onlyboolean
isCancellationRequested()
Function to be regularly checked by the background script inside the loop to see if the cancellation was requested.
-
-
-
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
-
-