For example, this is used by the
org. and
org. implementations to determine
whether the current test execution should be cancelled.
This interface is not intended to be implemented by clients.
org.junit.platform.launcher.core.LauncherExecutionRequestBuilder#cancellationToken(CancellationToken) , org.junit.platform.launcher.LauncherExecutionRequest#getCancellationToken() , ExecutionRequest#getCancellationToken()
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static CancellationToken | |
| public static CancellationToken | |
| public boolean | Returns: whether cancellation has been requestedReturns whether cancellation has been requested. |
| cancel | back to summary |
|---|---|
| public void cancel() Request cancellation. This will call subsequent calls to | |
| create | back to summary |
|---|---|
| public static CancellationToken create() Create a new, uncancelled cancellation token. | |
| disabled | back to summary |
|---|---|
| public static CancellationToken disabled() Get a new cancellation token that cannot be cancelled. This is only useful for cases when a cancellation token is required but is not supported or irrelevant, for example, in tests. | |
| isCancellationRequested | back to summary |
|---|---|
| public boolean isCancellationRequested() Returns whether cancellation has been requested. Once this method returns
| |