Task.TaskOutcome

  • Task.TaskOutcome is an annotation that indicates the result of a task execution attempt.

  • There are three possible outcomes: SUCCEEDED, FAILED, and UNSPECIFIED.

  • SUCCEEDED represents a successfully completed task, FAILED indicates a task that could not be completed or was cancelled, and UNSPECIFIED is the default for unknown outcomes.

  • When the TaskState is closed, TaskOutcome determines if the task was completed successfully.

public static abstract @interface Task.TaskOutcome implements Annotation

The outcome of an attempt to execute a task. When TaskState is closed, this indicates whether it was completed successfully or not.

Constant Summary

int FAILED Task could not be completed or was cancelled.
int SUCCEEDED Task was completed successfully.
int UNSPECIFIED Default, used for an unspecified or unrecognized Task outcome.

Inherited Method Summary

Constants

public static final int FAILED

Task could not be completed or was cancelled.

Constant Value: 2

public static final int SUCCEEDED

Task was completed successfully.

Constant Value: 1

public static final int UNSPECIFIED

Default, used for an unspecified or unrecognized Task outcome.

Constant Value: 0