BatchRequest class

Consists of methods related to batch request.

Package

com.sap.mobile.lib.request

Syntax

public class BatchRequest extends BaseRequest

Base class

Members

All members of BatchRequest, including inherited members.

Variables
Modifier and Type Variable Description
protected String batchRequestURL  
protected ArrayList< Object > batchRequestList  
protected static String BATCH_BOUNDARY_TEXT  
Constructors
Modifier and Type Constructor Description
public BatchRequest(String) Initializes the BatchRequest by providing the request URL.
Methods
Modifier and Type Method Description
public void addRequestToChangeset(IRequest) Adds a modify request such as HTTP POST/PUT/DELETE request to the change set.
public void addRetrieveRequestToBatch(IRequest) Adds a retrieve request to the batch.
public void closeExistingChangeSet() Closes the existing change set and adds the subsequent modify requests to a different change set.
Inherited members from BaseRequest
Modifier and Type Member Description
public void disableDeltaHandling(boolean) Disables delta query handling.
public byte[] getData() If the request method is POST, this method is called from the network library.
public InputStream getDataStream() If the request method is POST, this method is called from the network library.
public Map< String, String > getHeaders() Returns the request headers set.
public INetListener getListener() Returns the listener to be used by the connectivity library to notify the registered listener about a successful or failed request operation.
public int getPriority() Returns the priority of the request.
public int getRequestMethod() Returns the request method.
public String getRequestUrl() Returns the URL where the request must be fired.
public boolean isDeltaHandlingDisabled() internal
public boolean isStreamEnabled() Specifies if the data streaming is enabled for this request.
public void setData(byte[]) Set the request data in case of POST request.
public void setDataStream(InputStream) Set the request data stream in case of POST request.
public void setETag(String, int) sets the Etag for the request
public void setHeaders(Map< String, String >) Set the request headers.
public void setListener(INetListener) Client can register listeners to be used by the connectivity layer to notify the implementation about the result of the request.
public void setPriority(int) Sets the priority of the request.
public void setRequestMethod(int) Sets the request method.
public void setRequestUrl(String) Sets the URL for the request.
public void setStreamEnabled(boolean) Used to enable streaming of data when the size of the data to be fetched is greater than 200KB.
public boolean useCookies() This method is used by the network library to check whether it has to send cookies to the server when the current request is performed.
Inherited members from IRequest
Modifier and Type Member Description
public void setListener(final INetListener) Client can register listeners to be used by the connectivity layer to notify the implementation about the result of the request.
public void setPriority(final int) Sets the priority of the request.
public void setRequestMethod(final int) Sets the type of HTTP request method.
public void setRequestUrl(final String) Sets the URL for the request.

Usage

Batch Request is to be used when more than one retrieve/modify requests need to be clubbed.