Android SDK Version
- Mutable
- CollectionMapper
- AppCall
- CustomTab
- CustomTabUtils
- DialogFeature
- DialogPresenter
- FacebookDialogBase
- FacebookDialogFragment
- GamingAction
- FacebookWebFallbackDialog
- FragmentWrapper
- InstagramCustomTab
- PlatformServiceClient
- WebDialog
- AnalyticsEvents
- AttributionIdentifiers
- BoltsMeasurementEventListener
- BundleJSONConverter
- CallbackManagerImpl
- FacebookInitProvider
- FacebookRequestErrorClassification
- FacebookSignatureValidator
- FeatureManager
- FetchedAppGateKeepersManager
- FetchedAppSettings
- FetchedAppSettingsManager
- FileLruCache
- ImageDownloader
- ImageRequest
- ImageResponse
- ImageResponseCache
- InstallReferrerUtil
- InternalSettings
- LockOnGetVariable
- Logger
- NativeAppCallAttachmentStore
- NativeProtocol
- ServerProtocol
- SmartLoginOption
- UrlRedirectCache
- Utility
- Validate
- WorkQueue
- MessageDialog
- SendButton
- ShareButton
- ShareButtonBase
- GameRequestDialog
- ShareDialog
- MessageDialogFeature
- VideoUploader
- GameRequestValidation
- CameraEffectFeature
- CameraEffectJSONUtility
- LegacyNativeDialogParameters
- NativeDialogParameters
- ResultProcessor
- ShareConstants
- ShareContentValidation
- ShareDialogFeature
- ShareFeedContent
- ShareInternalUtility
- ShareStoryFeature
- WebDialogParameters
- ShareApi
- ShareBuilder
- Sharer
- Share
- ShareToMessengerParamsBuilder
- Messenger
- MessengerThreadParams
- MessengerUtils
- ShareToMessengerParams
- FacebookAppLinkResolver
- AppLinkData
- AppLinks
- AggregateException
- AppLink
- AppLinkResolver
- AppLinks
- CancellationToken
- CancellationTokenRegistration
- CancellationTokenSource
- Continuation
- ExecutorException
- Task
- TaskCompletionSource
- UnobservedTaskException
- AccessTokenTracker
- AuthenticationTokenTracker
- CustomTabActivity
- CustomTabMainActivity
- FacebookActivity
- FacebookAuthorizationException
- FacebookButtonBase
- FacebookCallback
- FacebookDialog
- FacebookDialogException
- LoginStatusCallback
- WebDialog
- AccessToken
- AccessTokenManager
- AccessTokenSource
- AuthenticationToken
- AuthenticationTokenCache
- AuthenticationTokenClaims
- AuthenticationTokenHeader
- AuthenticationTokenManager
- CallbackManager
- CurrentAccessTokenExpirationBroadcastReceiver
- FacebookBroadcastReceiver
- FacebookContentProvider
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookSdk
- FacebookSdkNotInitializedException
- FacebookServiceException
- GraphRequest
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphResponse
- HttpMethod
- LoggingBehavior
- Profile
- ProfileCache
- ProfileManager
- ProfileTracker
- ProgressNoopOutputStream
- ProgressOutputStream
- RequestProgress
- Common
- DeviceRequestsHelper
- EndToEndDumper
- CodeChallengeMethod
- CustomTabLoginMethodHandler
- CustomTabPrefetchHelper
- DeviceAuthDialog
- DeviceAuthMethodHandler
- GetTokenLoginMethodHandler
- KatanaProxyLoginMethodHandler
- LoginBehavior
- LoginClient
- LoginConfiguration
- LoginFragment
- LoginManager
- LoginMethodHandler
- LoginResult
- NativeAppLoginMethodHandler
- NonceUtil
- WebLoginMethodHandler
- WebViewLoginMethodHandler
- DefaultAudience
- LoginTargetApp
- DeviceLoginManager
- Login
- AppGroupCreationContent
- CameraEffectArguments
- CameraEffectTextures
- GameRequestContent
- ShareCameraEffectContent
- ShareContent
- ShareHashtag
- ShareLinkContent
- ShareMedia
- ShareMediaContent
- ShareMessengerActionButton
- ShareMessengerURLActionButton
- ShareModel
- ShareModelBuilder
- SharePhoto
- SharePhotoContent
- ShareStoryContent
- ShareVideo
- ShareVideoContent
- AccessTokenAppIdPair
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsManager
- FlushResult
- InternalAppEventsLogger
- UserDataStore
- MetadataIndexer
- MetadataRule
- SettingsAPIFields
- AppEventsCAPIManager
- CustomEventField
- AppEventType
- AppEventUserAndAppDataField
- ConversionsAPISection
- ConversionsAPICustomEventField
- ConversionsAPIUserAndAppDataField
- ConversionsAPIEventName
- OtherEventConstants
- AppEventsConversionsAPITransformer
- AppEventsConversionsAPITransformerWebRequests
- CodelessLoggingEventListener
- CodelessManager
- RCTCodelessLoggingEventListener
- ViewIndexer
- Constants
- EventBinding
- ParameterComponent
- PathComponent
- SensitiveUserDataUtils
- UnityReflection
- ViewHierarchy
- EventDeactivationManager
- InAppPurchaseActivityLifecycleTracker
- InAppPurchaseAutoLogger
- InAppPurchaseBillingClientWrapper
- InAppPurchaseEventManager
- InAppPurchaseLoggerManager
- InAppPurchaseManager
- InAppPurchaseSkuDetailsWrapper
- InAppPurchaseUtils
- IntegrityManager
- ActivityLifecycleTracker
- AppEventUtility
- AppEventsLoggerUtility
- AutomaticAnalyticsLogger
- Constants
- FileDownloadTask
- ViewHierarchyConstants
- MTensor
- Model
- ModelManager
- Utils
- OnDeviceProcessingManager
- RemoteServiceWrapper
- RestrictiveDataManager
- SuggestedEventsManager
- ViewOnClickListener
- Core
- GateKeeper
- GateKeeperRuntimeCache
- ExceptionAnalyzer
- InstrumentData
- InstrumentManager
- InstrumentUtility
- ANRDetector
- ANRHandler
- CrashHandler
- AutoHandleExceptions
- CrashShieldHandler
- NoAutoExceptionHandling
- ErrorReportData
- ErrorReportHandler
- ThreadCheckHandler
- Excuse
- ExcusesForDesignViolations
- CertificateUtil
- OidcSecurityUtil
- DeviceLoginButton
- LoginButton
- ProfilePictureView
- ToolTipPopup
- All
Nested Class Summary
Modifier and Type | Class | Description |
---|---|---|
public interface | Task.UnobservedExceptionHandler | Interface for handlers invoked when a failed Task is about to be finalized, but the exception has not been consumed.The handler will execute in the GC thread, so if the handler needs to do anything time consuming or complex it is a good idea to fire off a Task to handle the exception. |
public final class | Task.TaskCompletionSource | |
public class | Task.Companion |
Field Summary
Modifier and Type | Field | Description |
---|---|---|
private final Boolean | isCompleted | |
private final Boolean | isCancelled | |
private final Boolean | isFaulted | |
private final TResult | result | |
private final Exception | error |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
final Boolean | getIsCompleted() | |
final Boolean | getIsCancelled() | |
final Boolean | getIsFaulted() | |
final TResult | getResult() | |
final Exception | getError() | |
final Unit | waitForCompletion() | Blocks until the task is complete. |
final Boolean | waitForCompletion(Long duration, TimeUnit timeUnit) | Blocks until the task is complete or times out. |
final <TOut extends Any> Task<TOut> | cast() | Makes a fluent cast of a Task's result possible, avoiding an extra continuation just to cast the type of the result. |
final Task<Void> | makeVoid() | Turns a Task<T> into a Task<Void>, dropping any result. |
final Task<Void> | continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation) | Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation. |
final Task<Void> | continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation, CancellationToken ct) | Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation. |
final Task<Void> | continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation, Executor executor, CancellationToken ct) | Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWith(Continuation<TResult, TContinuationResult> continuation, Executor executor) | Adds a continuation that will be scheduled using the executor, returning a new task that completes after the continuation has finished running. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWith(Continuation<TResult, TContinuationResult> continuation, Executor executor, CancellationToken ct) | Adds a continuation that will be scheduled using the executor, returning a new task that completes after the continuation has finished running. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWith(Continuation<TResult, TContinuationResult> continuation) | Adds a synchronous continuation to this task, returning a new task that completes after the continuation has finished running. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWith(Continuation<TResult, TContinuationResult> continuation, CancellationToken ct) | Adds a synchronous continuation to this task, returning a new task that completes after the continuation has finished running. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor) | Adds an Task-based continuation to this task that will be scheduled using the executor, returning a new task that completes after the task returned by the continuation has completed. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor, CancellationToken ct) | Adds an Task-based continuation to this task that will be scheduled using the executor, returning a new task that completes after the task returned by the continuation has completed. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation) | Adds an asynchronous continuation to this task, returning a new task that completes after the task returned by the continuation has completed. |
final <TContinuationResult extends Any> Task<TContinuationResult> | continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, CancellationToken ct) | Adds an asynchronous continuation to this task, returning a new task that completes after the task returned by the continuation has completed. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccess(Continuation<TResult, TContinuationResult> continuation, Executor executor) | Runs a continuation when a task completes successfully, forwarding along Exception or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccess(Continuation<TResult, TContinuationResult> continuation, Executor executor, CancellationToken ct) | Runs a continuation when a task completes successfully, forwarding along Exception or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccess(Continuation<TResult, TContinuationResult> continuation) | Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccess(Continuation<TResult, TContinuationResult> continuation, CancellationToken ct) | Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor) | Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor, CancellationToken ct) | Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation) | Runs a continuation when a task completes successfully, forwarding along [ ]s or cancellation. |
final <TContinuationResult extends Any> Task<TContinuationResult> | onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, CancellationToken ct) | Runs a continuation when a task completes successfully, forwarding along [ ]s or cancellation. |
final Boolean | trySetCancelled() | Sets the cancelled flag on the Task if the Task hasn't already been completed. |
final Boolean | trySetResult(TResult result) | Sets the result on the Task if the Task hasn't already been completed. |
final Boolean | trySetError(Exception error) | Sets the error on the Task if the Task hasn't already been completed. |
Method Detail
getIsCompleted
final BooleangetIsCompleted()
getIsCancelled
final BooleangetIsCancelled()
getIsFaulted
final BooleangetIsFaulted()
waitForCompletion
final BooleanwaitForCompletion(Long duration, TimeUnit timeUnit)
Blocks until the task is complete or times out.
cast
final <TOut extends Any> Task<TOut> cast()
Makes a fluent cast of a Task's result possible, avoiding an extra continuation just to cast the type of the result.
makeVoid
final Task<Void> makeVoid()
Turns a Task<T> into a Task<Void>, dropping any result. </Void></T>
continueWhile
final Task<Void> continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation)
Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation.
continueWhile
final Task<Void> continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation, CancellationToken ct)
Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation.
continueWhile
final Task<Void> continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation, Executor executor, CancellationToken ct)
Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation.
continueWith
final <TContinuationResult extends Any> Task<TContinuationResult> continueWith(Continuation<TResult, TContinuationResult> continuation, Executor executor)
Adds a continuation that will be scheduled using the executor, returning a new task that completes after the continuation has finished running. This allows the continuation to be scheduled on different thread.
continueWith
final <TContinuationResult extends Any> Task<TContinuationResult> continueWith(Continuation<TResult, TContinuationResult> continuation, Executor executor, CancellationToken ct)
Adds a continuation that will be scheduled using the executor, returning a new task that completes after the continuation has finished running. This allows the continuation to be scheduled on different thread.
continueWith
final <TContinuationResult extends Any> Task<TContinuationResult> continueWith(Continuation<TResult, TContinuationResult> continuation)
Adds a synchronous continuation to this task, returning a new task that completes after the continuation has finished running.
continueWith
final <TContinuationResult extends Any> Task<TContinuationResult> continueWith(Continuation<TResult, TContinuationResult> continuation, CancellationToken ct)
Adds a synchronous continuation to this task, returning a new task that completes after the continuation has finished running.
continueWithTask
final <TContinuationResult extends Any> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor)
Adds an Task-based continuation to this task that will be scheduled using the executor, returning a new task that completes after the task returned by the continuation has completed.
continueWithTask
final <TContinuationResult extends Any> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor, CancellationToken ct)
Adds an Task-based continuation to this task that will be scheduled using the executor, returning a new task that completes after the task returned by the continuation has completed.
continueWithTask
final <TContinuationResult extends Any> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation)
Adds an asynchronous continuation to this task, returning a new task that completes after the task returned by the continuation has completed.
continueWithTask
final <TContinuationResult extends Any> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation, CancellationToken ct)
Adds an asynchronous continuation to this task, returning a new task that completes after the task returned by the continuation has completed.
onSuccess
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccess(Continuation<TResult, TContinuationResult> continuation, Executor executor)
Runs a continuation when a task completes successfully, forwarding along Exception or cancellation.
onSuccess
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccess(Continuation<TResult, TContinuationResult> continuation, Executor executor, CancellationToken ct)
Runs a continuation when a task completes successfully, forwarding along Exception or cancellation.
onSuccess
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccess(Continuation<TResult, TContinuationResult> continuation)
Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation.
onSuccess
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccess(Continuation<TResult, TContinuationResult> continuation, CancellationToken ct)
Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation.
onSuccessTask
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor)
Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation.
onSuccessTask
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor, CancellationToken ct)
Runs a continuation when a task completes successfully, forwarding along Exceptions or cancellation.
onSuccessTask
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation)
Runs a continuation when a task completes successfully, forwarding along [ ]s or cancellation.
onSuccessTask
final <TContinuationResult extends Any> Task<TContinuationResult> onSuccessTask(Continuation<TResult, Task<TContinuationResult>> continuation, CancellationToken ct)
Runs a continuation when a task completes successfully, forwarding along [ ]s or cancellation.
trySetCancelled
final BooleantrySetCancelled()
Sets the cancelled flag on the Task if the Task hasn't already been completed.
trySetResult
final BooleantrySetResult(TResult result)
Sets the result on the Task if the Task hasn't already been completed.
trySetError
final BooleantrySetError(Exception error)
Sets the error on the Task if the Task hasn't already been completed.