public class ServerRequestPing extends ServerRequest
The server request for pinging the API to process the queue.
ServerRequest.BRANCH_API_VERSIONconstructError_, prefHelper_, requestPath_| Constructor and Description |
|---|
ServerRequestPing(android.content.Context context)
Configures a server request to process the request queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearCallbacks()
Clears the callbacks associated to this request.
|
boolean |
handleErrors(android.content.Context context)
Should be implemented by the child class.Specifies any error associated with request.
|
void |
handleFailure(int statusCode,
java.lang.String causeMsg)
Called when there is an error on executing this request.
|
boolean |
isGetRequest()
Specify whether the request is a GET or POST.
|
void |
onRequestSucceeded(ServerResponse response,
Branch branch)
Called when execution of this request to server succeeds.
|
addGetParam, addProcessWaitLock, doesAppHasInternetPermission, fromJSON, getBranchRemoteAPIVersion, getGetParams, getPost, getPostWithInstrumentationValues, getQueueWaitTime, getRequestPath, getRequestUrl, isGAdsParamsRequired, isWaitingOnProcessToFinish, onPreExecute, onRequestQueued, prepareExecuteWithoutTracking, removeProcessWaitLock, reportTrackingDisabledError, setPost, shouldRetryOnFail, shouldUpdateLimitFacebookTracking, toJSON, updateEnvironmentpublic ServerRequestPing(android.content.Context context)
Configures a server request to process the request queue.
context - Current Application contextpublic boolean handleErrors(android.content.Context context)
ServerRequestShould be implemented by the child class.Specifies any error associated with request. If there are errors request will not be executed.
handleErrors in class ServerRequestcontext - Application context.Boolean which is set to true if there are errors with this request.
Child class is responsible for implementing its own logic for error check and reporting.public void onRequestSucceeded(ServerResponse response, Branch branch)
ServerRequestCalled when execution of this request to server succeeds. Child class should implement its own logic for handling the post request execution.
onRequestSucceeded in class ServerRequestresponse - A ServerResponse object containing server response for this request.branch - Current Branch instancepublic void handleFailure(int statusCode,
java.lang.String causeMsg)
ServerRequestCalled when there is an error on executing this request. Child class should handle the failure accordingly.
handleFailure in class ServerRequeststatusCode - A Integer value specifying http return code or any branch specific error defined in BranchError.causeMsg - A String value specifying cause for the error if any.public boolean isGetRequest()
ServerRequestisGetRequest in class ServerRequestBoolean value specifying if this request is a GET or not.public void clearCallbacks()
ServerRequestclearCallbacks in class ServerRequest