public class TaskCompletionSource<TResult>
extends java.lang.Object
| Constructor and Description | 
|---|
| TaskCompletionSource()Creates a TaskCompletionSource that orchestrates a Task. | 
| Modifier and Type | Method and Description | 
|---|---|
| Task<TResult> | getTask() | 
| void | setCancelled()Sets the cancelled flag on the task, throwing if the Task has already been completed. | 
| void | setError(java.lang.Exception error)Sets the error of the Task, throwing if the Task has already been completed. | 
| void | setResult(TResult result)Sets the result of the Task, throwing if the Task has already been completed. | 
| boolean | trySetCancelled()Sets the cancelled flag on the Task if the Task hasn't already been completed. | 
| boolean | trySetError(java.lang.Exception error)Sets the error on the Task if the Task hasn't already been completed. | 
| boolean | trySetResult(TResult result)Sets the result on the Task if the Task hasn't already been completed. | 
public TaskCompletionSource()
public boolean trySetCancelled()
public boolean trySetResult(TResult result)
public boolean trySetError(java.lang.Exception error)
public void setCancelled()
public void setResult(TResult result)
public void setError(java.lang.Exception error)