com.aspose.tasks

Interfaces

Classes

Exceptions

Class CancellationTokenSource


  • public class CancellationTokenSource
    extends Object
    Signals to a `CancellationToken` that it should be canceled.
    • Constructor Detail

      • CancellationTokenSource

        public CancellationTokenSource()
    • Method Detail

      • getToken

        public CancellationToken getToken()
        Creates the new `CancellationToken` associated with this `CancellationTokenSource`.
        Returns:
        a token associated with this `CancellationTokenSource`.
      • isCancellationRequested

        public boolean isCancellationRequested()
        Gets whether cancellation has been requested for this CancellationTokenSource.
        Returns:
        true, if cancellation has been requested; false otherwise.
      • cancel

        public void cancel()
        Communicates a request for cancellation.