Android SDK Version
- AccessToken
- AccessToken.AccessTokenCreationCallback
- AccessToken.AccessTokenRefreshCallback
- AccessTokenManager
- AccessTokenSource
- AccessTokenTracker
- AddressFilterManager
- All
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsLogger.FlushBehavior
- AppEventsLogger.ProductAvailability
- AppEventsLogger.ProductCondition
- AppEventsManager
- AppGroupCreationContent
- AppGroupCreationContent.AppGroupPrivacy
- AppGroupCreationContent.Builder
- AppInviteContent
- AppInviteContent.Builder
- AppInviteContent.Builder.Destination
- AppInviteDialog
- AppInviteDialog.Result
- AppLinkData
- AppLinkData.CompletionHandler
- AppLinks
- CallbackManager
- CallbackManager.Factory
- CameraEffectArguments
- CameraEffectArguments.Builder
- CameraEffectTextures
- CameraEffectTextures.Builder
- CodelessLoggingEventListener
- CodelessLoggingEventListener.AutoLoggingOnClickListener
- CodelessLoggingEventListener.AutoLoggingOnItemClickListener
- CodelessManager
- Common
- Core
- CreateAppGroupDialog
- CreateAppGroupDialog.Result
- CurrentAccessTokenExpirationBroadcastReceiver
- CurrentPlaceFeedbackRequestParams
- CurrentPlaceFeedbackRequestParams.Builder
- CurrentPlaceRequestParams
- CurrentPlaceRequestParams.Builder
- CurrentPlaceRequestParams.ConfidenceLevel
- CurrentPlaceRequestParams.ScanMode
- CustomTabActivity
- CustomTabLoginMethodHandler
- CustomTabMainActivity
- DefaultAudience
- DeviceAuthDialog
- DeviceLoginButton
- DeviceLoginManager
- DeviceShareButton
- DeviceShareDialog
- DeviceShareDialog.Result
- EventDeactivationManager
- FacebookActivity
- FacebookAppLinkResolver
- FacebookAuthorizationException
- FacebookBroadcastReceiver
- FacebookButtonBase
- FacebookCallback
- FacebookContentProvider
- FacebookDialog
- FacebookDialogException
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookRequestError.Category
- FacebookSdk
- FacebookSdk.InitializeCallback
- FacebookSdkNotInitializedException
- FacebookServiceException
- FlushResult
- GameRequestContent
- GameRequestContent.ActionType
- GameRequestContent.Builder
- GameRequestContent.Filters
- GameRequestDialog
- GameRequestDialog.Result
- GraphRequest
- GraphRequest.Callback
- GraphRequest.GraphJSONArrayCallback
- GraphRequest.GraphJSONObjectCallback
- GraphRequest.OnProgressCallback
- GraphRequest.ParcelableResourceWithMimeType
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphRequestBatch.Callback
- GraphRequestBatch.OnProgressCallback
- GraphResponse
- GraphResponse.PagingDirection
- HttpMethod
- InternalAppEventsLogger
- JoinAppGroupDialog
- JoinAppGroupDialog.Result
- LikeView
- LikeView.AuxiliaryViewPosition
- LikeView.HorizontalAlignment
- LikeView.ObjectType
- LikeView.OnErrorListener
- LikeView.Style
- LoggingBehavior
- Login
- LoginBehavior
- LoginButton
- LoginButton.ToolTipMode
- LoginFragment
- LoginManager
- LoginResult
- LoginStatusCallback
- MessageDialog
- Messenger
- MessengerThreadParams
- MessengerThreadParams.Origin
- MessengerUtils
- MetadataIndexer
- Model
- ModelManager
- PlaceFields
- PlaceInfoRequestParams
- PlaceInfoRequestParams.Builder
- PlaceManager
- PlaceManager.LocationError
- PlaceManager.OnRequestReadyCallback
- Places
- PlaceSearchRequestParams
- PlaceSearchRequestParams.Builder
- Profile
- ProfileManager
- ProfilePictureView
- ProfilePictureView.OnErrorListener
- ProfileTracker
- RCTCodelessLoggingEventListener
- RCTCodelessLoggingEventListener.AutoLoggingOnTouchListener
- RestrictiveDataManager
- SendButton
- Share
- ShareApi
- ShareBuilder
- ShareButton
- ShareButtonBase
- ShareCameraEffectContent
- ShareCameraEffectContent.Builder
- ShareContent
- ShareContent.Builder
- ShareDialog
- ShareDialog.Mode
- ShareGraphRequest
- ShareHashtag
- ShareHashtag.Builder
- ShareLinkContent
- ShareLinkContent.Builder
- ShareMedia
- ShareMedia.Builder
- ShareMedia.Type
- ShareMediaContent
- ShareMediaContent.Builder
- ShareMessengerActionButton
- ShareMessengerActionButton.Builder
- ShareMessengerGenericTemplateContent
- ShareMessengerGenericTemplateContent.Builder
- ShareMessengerGenericTemplateContent.ImageAspectRatio
- ShareMessengerGenericTemplateElement
- ShareMessengerGenericTemplateElement.Builder
- ShareMessengerMediaTemplateContent
- ShareMessengerMediaTemplateContent.Builder
- ShareMessengerMediaTemplateContent.MediaType
- ShareMessengerOpenGraphMusicTemplateContent
- ShareMessengerOpenGraphMusicTemplateContent.Builder
- ShareMessengerURLActionButton
- ShareMessengerURLActionButton.Builder
- ShareMessengerURLActionButton.WebviewHeightRatio
- ShareModel
- ShareModelBuilder
- ShareOpenGraphAction
- ShareOpenGraphAction.Builder
- ShareOpenGraphContent
- ShareOpenGraphContent.Builder
- ShareOpenGraphObject
- ShareOpenGraphObject.Builder
- ShareOpenGraphValueContainer
- ShareOpenGraphValueContainer.Builder
- SharePhoto
- SharePhoto.Builder
- SharePhotoContent
- SharePhotoContent.Builder
- Sharer
- Sharer.Result
- ShareStoryContent
- ShareStoryContent.Builder
- ShareToMessengerParams
- ShareToMessengerParamsBuilder
- ShareVideo
- ShareVideo.Builder
- ShareVideoContent
- ShareVideoContent.Builder
- SuggestedEventsManager
- ToolTipPopup
- ToolTipPopup.Style
- UserDataStore
- Utils
- ViewIndexer
- ViewOnClickListener
- WebDialog
- java.lang.Object
- java.util.AbstractCollection<E>
- java.util.AbstractList<GraphRequest>
- com.facebook.GraphRequestBatch
All Implemented Interfaces:
public class GraphRequestBatch extends java.util.AbstractList<GraphRequest>
RequestBatch contains a list of Request objects that can be sent to Facebook in a single round-trip.
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
static interface | GraphRequestBatch.Callback Specifies the interface that consumers of the RequestBatch class can implement in order to be notified when the entire batch completes execution. |
static interface | GraphRequestBatch.OnProgressCallback Specifies the interface that consumers of the RequestBatch class can implement in order to be notified when the batch makes progress. |
Constructor Summary
Constructor and Description |
---|
GraphRequestBatch() Constructor. |
GraphRequestBatch(java.util.Collection<GraphRequest> requests) Constructor. |
GraphRequestBatch(GraphRequest... requests) Constructor. |
GraphRequestBatch(GraphRequestBatch requests) Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | add(GraphRequest request) |
void | add(int location, GraphRequest request) |
void | addCallback(GraphRequestBatch.Callback callback) Adds a batch-level callback which will be called when the entire batch has finished executing. |
void | clear() |
java.util.List<GraphResponse> | executeAndWait() Executes this batch on the current thread and returns the responses. |
GraphRequestAsyncTask | executeAsync() Executes this batch asynchronously. |
GraphRequest | get(int i) |
java.lang.String | getBatchApplicationId() Getter for the batch application id. |
int | getTimeout() Gets the timeout to wait for responses from the server before a timeout error occurs. |
GraphRequest | remove(int location) |
void | removeCallback(GraphRequestBatch.Callback callback) Removes a batch-level callback. |
GraphRequest | set(int location, GraphRequest request) |
void | setBatchApplicationId(java.lang.String batchApplicationId) Setter for the batch application id. |
void | setTimeout(int timeoutInMilliseconds) Sets the timeout to wait for responses from the server before a timeout error occurs. |
int | size() |
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Constructor Detail
GraphRequestBatch
public GraphRequestBatch()
Constructor. Creates an empty batch.
GraphRequestBatch
public GraphRequestBatch(java.util.Collection<GraphRequest> requests)
Constructor.
Parameters:
requests
- the requests to add to the batchGraphRequestBatch
public GraphRequestBatch(GraphRequest... requests)
Constructor.
Parameters:
requests
- the requests to add to the batchGraphRequestBatch
public GraphRequestBatch(GraphRequestBatch requests)
Constructor.
Parameters:
requests
- the requests to add to the batchMethod Detail
getTimeout
public int getTimeout()
Gets the timeout to wait for responses from the server before a timeout error occurs.
Returns:
the timeout, in milliseconds; 0 (the default) means do not timeout
setTimeout
public void setTimeout(int timeoutInMilliseconds)
Sets the timeout to wait for responses from the server before a timeout error occurs.
Parameters:
timeoutInMilliseconds
- the timeout, in milliseconds; 0 means do not timeoutaddCallback
public void addCallback(GraphRequestBatch.Callback callback)
Adds a batch-level callback which will be called when the entire batch has finished executing.
Parameters:
callback
- the callbackremoveCallback
public void removeCallback(GraphRequestBatch.Callback callback)
Removes a batch-level callback.
Parameters:
callback
- the callbackadd
public final boolean add(GraphRequest request)
Specified by:
add
in interface java.util.Collection<GraphRequest>
Specified by:
add
in interface java.util.List<GraphRequest>
Overrides:
add
in class java.util.AbstractList<GraphRequest>
add
public final void add(int location, GraphRequest request)
Specified by:
add
in interface java.util.List<GraphRequest>
Overrides:
add
in class java.util.AbstractList<GraphRequest>
clear
public final void clear()
Specified by:
clear
in interface java.util.Collection<GraphRequest>
Specified by:
clear
in interface java.util.List<GraphRequest>
Overrides:
clear
in class java.util.AbstractList<GraphRequest>
get
public final GraphRequest get(int i)
Specified by:
get
in interface java.util.List<GraphRequest>
Specified by:
get
in class java.util.AbstractList<GraphRequest>
remove
public final GraphRequest remove(int location)
Specified by:
remove
in interface java.util.List<GraphRequest>
Overrides:
remove
in class java.util.AbstractList<GraphRequest>
set
public final GraphRequest set(int location, GraphRequest request)
Specified by:
set
in interface java.util.List<GraphRequest>
Overrides:
set
in class java.util.AbstractList<GraphRequest>
size
public final int size()
Specified by:
size
in interface java.util.Collection<GraphRequest>
Specified by:
size
in interface java.util.List<GraphRequest>
Specified by:
size
in class java.util.AbstractCollection<GraphRequest>
getBatchApplicationId
public final java.lang.String getBatchApplicationId()
Getter for the batch application id.
Returns:
the batch application id.
setBatchApplicationId
public final void setBatchApplicationId(java.lang.String batchApplicationId)
Setter for the batch application id.
Parameters:
batchApplicationId
- The batch application id.executeAndWait
public final java.util.List<GraphResponse> executeAndWait()
Executes this batch on the current thread and returns the responses. This should only be used if you have transitioned off the UI thread.
Returns:
a list of Response objects representing the results of the requests; responses are returned in the same order as the requests were specified.
Throws:
FacebookException
- If there was an error in the protocol used to communicate with the servicejava.lang.IllegalArgumentException
- if the passed in RequestBatch is emptyjava.lang.NullPointerException
- if the passed in RequestBatch or any of its contents are nullexecuteAsync
public final GraphRequestAsyncTask executeAsync()
Executes this batch asynchronously. This function will return immediately, and the batch will be processed on a separate thread. In order to process results of a request, or determine whether a request succeeded or failed, a callback must be specified (see
GraphRequest.setCallback(GraphRequest.Callback)
) This should only be called from the UI thread.Returns:
a RequestAsyncTask that is executing the request
Throws:
java.lang.IllegalArgumentException
- if this batch is emptyjava.lang.NullPointerException
- if any of the contents of this batch are null