InterruptionToken

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.IInterruptionToken

public class InterruptionToken implements IInterruptionToken

This class represents the token to use for signaling long running tasks whether the interruption was requested.

Methods

MethodDescription
getNone()Represents an empty interruption token.
isInterruptionRequested()Returns true if interruption was requested.
throwIfInterruptionRequested()Throws an if interruption was requested.

getNone()

public static InterruptionToken getNone()

Represents an empty interruption token.


Long-running operations will never be interrupted via InterruptionTokenSource.interrupt when using this token.

Returns: InterruptionToken

isInterruptionRequested()

public final boolean isInterruptionRequested()

Returns true if interruption was requested.

Returns: boolean

throwIfInterruptionRequested()

public final void throwIfInterruptionRequested()

Throws an if interruption was requested.