public class BoxRequestBatch extends BoxRequest<BoxResponseBatch,BoxRequestBatch>
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<BoxRequest> |
mRequests |
JSON_OBJECT, mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mRequiresSocket, mSession, mTimeout| Constructor and Description |
|---|
BoxRequestBatch()
Initializes a new BoxRequestBatch
|
| Modifier and Type | Method and Description |
|---|---|
BoxRequestBatch |
addRequest(BoxRequest request)
Adds a BoxRequest to the batch
|
BoxResponseBatch |
onSend()
Synchronously make the request to Box and handle the response appropriately.
|
BoxRequestBatch |
setExecutor(java.util.concurrent.ExecutorService executor)
Requests will run in parallel if Executor is set by caller otherwise requests will run sequentially.
|
buildUrl, createHeaderMap, createHttpRequest, createQuery, equals, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getSocket, getStringBody, handleSendForCachedResult, handleToTaskForCachedResult, handleUpdateCache, hashCode, importRequestContentMapsFrom, logDebug, logRequest, onSendCompleted, parseHashMapEntry, parseJsonObject, send, sendRequest, setBody, setContentType, setHeaders, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskprotected java.util.ArrayList<BoxRequest> mRequests
public BoxRequestBatch setExecutor(java.util.concurrent.ExecutorService executor)
executor - executor used to execute this request in parallelpublic BoxRequestBatch addRequest(BoxRequest request)
request - the BoxRequest to addpublic BoxResponseBatch onSend() throws BoxException
BoxRequestonSend in class BoxRequest<BoxResponseBatch,BoxRequestBatch>BoxException - thrown if there was a problem with handling the request.