public abstract class

ControllableTask

extends CancellableTask<TState>
java.lang.Object
   ↳ com.google.android.gms.tasks.Task<TState>
     ↳ com.google.firebase.storage.CancellableTask<TState>
       ↳ com.google.firebase.storage.ControllableTask<TState>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Represents an asynchronous operation that can be paused, resumed and canceled. This task also receives progress and other state change notifications.

Summary

Public Constructors
ControllableTask()
Public Methods
abstract ControllableTask<TState> addOnPausedListener(Activity activity, OnPausedListener<? super TState> listener)
Adds a listener that is called when the Task becomes paused.
abstract ControllableTask<TState> addOnPausedListener(OnPausedListener<? super TState> listener)
Adds a listener that is called when the Task becomes paused.
abstract ControllableTask<TState> 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.
[Expand]
Inherited Methods
From class com.google.firebase.storage.CancellableTask
From class com.google.android.gms.tasks.Task
From class java.lang.Object

Public Constructors

public ControllableTask ()

Public Methods

public abstract ControllableTask<TState> addOnPausedListener (Activity activity, OnPausedListener<? super TState> listener)

Adds a listener that is called when the Task becomes paused.

Parameters
activity Activity: When the supplied Activity stops, this listener will automatically be removed.
listener OnPausedListener
Returns
ControllableTask<TState> this Task

public abstract ControllableTask<TState> addOnPausedListener (OnPausedListener<? super TState> listener)

Adds a listener that is called when the Task becomes paused.

Parameters
listener OnPausedListener
Returns
ControllableTask<TState> this Task

public abstract ControllableTask<TState> addOnPausedListener (Executor executor, OnPausedListener<? super TState> listener)

Adds a listener that is called when the Task becomes paused.

Parameters
executor Executor: the executor to use to call the listener
listener OnPausedListener
Returns
ControllableTask<TState> this Task

public abstract boolean isPaused ()

Returns
boolean true if the task has been paused.

public abstract boolean pause ()

Attempts to pause the task. A paused task can later be resumed.

Returns
boolean true if this task was successfully paused or is in the process of being paused. Returns false if the task is already completed or in a state that cannot be paused.

public abstract boolean resume ()

Attempts to resume this task.

Returns
boolean true if the task is successfully resumed or is in the process of being resumed. Returns false if the task is already completed or in a state that cannot be resumed.