An controllable task that uploads and fires events for success, progress and failure. It also allows pause and resume to control the upload operation.
| class | UploadTask.TaskSnapshot | Encapsulates state about the running UploadTask |
|
| protected final Object | mSyncObject |
| void | |
| void | |
| void |
schedule()
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCanceledListener(OnCanceledListener listener)
Adds a listener that is called if the Task is canceled.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCanceledListener(Executor executor, OnCanceledListener listener)
Adds a listener that is called if the Task is canceled.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCanceledListener(Activity activity, OnCanceledListener listener)
Adds an Activity-scoped listener that is called if the Task is canceled.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCompleteListener(OnCompleteListener<UploadTask.TaskSnapshot> listener)
Adds a listener that is called when the Task succeeds or fails.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCompleteListener(Activity activity, OnCompleteListener<UploadTask.TaskSnapshot> listener)
Adds a listener that is called when the Task succeeds or fails.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnCompleteListener(Executor executor, OnCompleteListener<UploadTask.TaskSnapshot> listener)
Adds a listener that is called when the Task succeeds or fails.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnFailureListener(Activity activity, OnFailureListener listener)
Adds a listener that is called if the Task fails.
|
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> |
addOnFailureListener(Executor executor, OnFailureListener listener)
Adds a listener that is called if the Task fails.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnPausedListener(Executor executor, OnPausedListener<? super TResult> listener)
Adds a listener that is called when the Task becomes paused.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnPausedListener(Activity activity, OnPausedListener<? super TResult> listener)
Adds a listener that is called when the Task becomes paused.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnPausedListener(OnPausedListener<? super TResult> listener)
Adds a listener that is called when the Task becomes paused.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnProgressListener(Executor executor, OnProgressListener<? super TResult> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnProgressListener(OnProgressListener<? super TResult> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnProgressListener(Activity activity, OnProgressListener<? super TResult> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnSuccessListener(OnSuccessListener<? super TResult> listener)
Adds a listener that is called if the Task completes successfully.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnSuccessListener(Activity activity, OnSuccessListener<? super TResult> listener)
Adds a listener that is called if the Task completes successfully.
|
| StorageTask<UploadTask.TaskSnapshot> |
addOnSuccessListener(Executor executor, OnSuccessListener<? super TResult> listener)
Adds a listener that is called if the Task completes successfully.
|
| boolean |
cancel()
Attempts to cancel the task.
|
| <TContinuationResult> Task<TContinuationResult> |
continueWith(Continuation<UploadTask.TaskSnapshot, TContinuationResult> continuation)
Returns a new Task that will be completed with the result of applying the specified
Continuation to this Task.
|
| <TContinuationResult> Task<TContinuationResult> |
continueWith(Executor executor, Continuation<UploadTask.TaskSnapshot, TContinuationResult> continuation)
Returns a new Task that will be completed with the result of applying the specified
Continuation to this Task.
|
| <TContinuationResult> Task<TContinuationResult> |
continueWithTask(Executor executor, Continuation<UploadTask.TaskSnapshot, Task<TContinuationResult>> continuation)
Returns a new Task that will be completed with the result of applying the specified
Continuation to this Task.
|
| <TContinuationResult> Task<TContinuationResult> |
continueWithTask(Continuation<UploadTask.TaskSnapshot, Task<TContinuationResult>> continuation)
Returns a new Task that will be completed with the result of applying the specified
Continuation to this Task.
|
| Exception |
getException()
Returns the exception that caused the Task to fail.
|
| UploadTask.TaskSnapshot |
getResult()
Gets the result of the Task, if it has already completed.
|
| <X extends Throwable> UploadTask.TaskSnapshot | |
| UploadTask.TaskSnapshot |
getSnapshot()
Returns the current state of the task.
|
| boolean |
isCanceled()
Returns
true if the task has been canceled. |
| boolean |
isComplete()
Returns
true if the Task is complete; false otherwise. |
| boolean |
isInProgress()
Returns
true if the task is currently running. |
| boolean |
isPaused()
Returns
true if the task has been paused. |
| boolean |
isSuccessful()
Returns
true if the Task has completed successfully; false otherwise. |
| void | |
| void | |
| void |
onPaused()
|
| void | |
| void |
onQueued()
|
| void | |
| <TContinuationResult> Task<TContinuationResult> |
onSuccessTask(Executor executor, SuccessContinuation<UploadTask.TaskSnapshot, TContinuationResult> continuation)
Returns a new Task that will be completed with the result of applying the specified
SuccessContinuation to this Task when this Task completes successfully.
|
| <TContinuationResult> Task<TContinuationResult> |
onSuccessTask(SuccessContinuation<UploadTask.TaskSnapshot, TContinuationResult> continuation)
Returns a new Task that will be completed with the result of applying the specified
SuccessContinuation to this Task when this Task completes successfully.
|
| boolean |
pause()
Attempts to pause the task.
|
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> | |
| StorageTask<UploadTask.TaskSnapshot> | |
| boolean |
resume()
Attempts to resume a paused task.
|
| abstract ControllableTask<TResult extends StorageTask.ProvideError> |
addOnPausedListener(Activity activity, OnPausedListener<? super TState> listener)
Adds a listener that is called when the Task becomes paused.
|
| abstract ControllableTask<TResult extends StorageTask.ProvideError> |
addOnPausedListener(OnPausedListener<? super TState> listener)
Adds a listener that is called when the Task becomes paused.
|
| abstract ControllableTask<TResult extends StorageTask.ProvideError> |
addOnPausedListener(Executor executor, OnPausedListener<? super TState> listener)
Adds a listener that is called when the Task becomes paused.
|
| abstract boolean |
isPaused()
|
| abstract boolean |
pause()
Attempts to pause the task.
|
| abstract boolean |
resume()
Attempts to resume this task.
|
| abstract CancellableTask<TResult extends StorageTask.ProvideError> |
addOnProgressListener(OnProgressListener<? super TState> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| abstract CancellableTask<TResult extends StorageTask.ProvideError> |
addOnProgressListener(Executor executor, OnProgressListener<? super TState> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| abstract CancellableTask<TResult extends StorageTask.ProvideError> |
addOnProgressListener(Activity activity, OnProgressListener<? super TState> listener)
Adds a listener that is called periodically while the ControllableTask executes.
|
| abstract boolean |
cancel()
Attempts to cancel the task.
|
| abstract boolean | |
| abstract boolean |
| Task<TResult> |
addOnCanceledListener(OnCanceledListener arg0)
|
| Task<TResult> | |
| Task<TResult> | |
| Task<TResult> |
addOnCompleteListener(OnCompleteListener arg0)
|
| Task<TResult> | |
| Task<TResult> | |
| abstract Task<TResult> | |
| abstract Task<TResult> |
addOnFailureListener(OnFailureListener arg0)
|
| abstract Task<TResult> | |
| abstract Task<TResult> | |
| abstract Task<TResult> |
addOnSuccessListener(OnSuccessListener arg0)
|
| abstract Task<TResult> | |
| <TContinuationResult> Task<TContinuationResult> |
continueWith(Continuation arg0)
|
| <TContinuationResult> Task<TContinuationResult> | |
| <TContinuationResult> Task<TContinuationResult> |
continueWithTask(Continuation arg0)
|
| <TContinuationResult> Task<TContinuationResult> | |
| abstract Exception |
getException()
|
| abstract TResult |
getResult()
|
| abstract <X extends Throwable> TResult |
getResult(Class arg0)
|
| abstract boolean |
isCanceled()
|
| abstract boolean |
isComplete()
|
| abstract boolean |
isSuccessful()
|
| <TContinuationResult> Task<TContinuationResult> | |
| <TContinuationResult> Task<TContinuationResult> |
onSuccessTask(SuccessContinuation arg0)
|