-
public class ServerRequestCreateQRCode extends ServerRequest
-
-
Method Summary
Modifier and Type Method Description booleanhandleErrors(Context context)Should be implemented by the child class.Specifies any error associated with request.If there are errors request will not be executed. voidonRequestSucceeded(ServerResponse response, Branch branch)Called when execution of this request to server succeeds. voidhandleFailure(int statusCode, String causeMsg)Called when there is an error on executing this request. voidonRequestQueued()Called when request is added to teh queue booleanisGetRequest()Specify whether the request is a GET or POST. voidclearCallbacks()Clears the callbacks associated to this request. -
Methods inherited from class io.branch.referral.ServerRequest
addProcessWaitLock, fromJSON, getBranchRemoteAPIVersion, getGetParams, getPost, getPostWithInstrumentationValues, getQueueWaitTime, getRequestPath, getRequestUrl, isGAdsParamsRequired, isWaitingOnProcessToFinish, onPreExecute, removeProcessWaitLock, shouldRetryOnFail, toJSON -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
handleErrors
boolean handleErrors(Context context)
Should be implemented by the child class.Specifies any error associated with request.If there are errors request will not be executed.
- Parameters:
context- Application context.
-
onRequestSucceeded
void onRequestSucceeded(ServerResponse response, Branch branch)
Called when execution of this request to server succeeds. Child class should implementits own logic for handling the post request execution.
- Parameters:
response- A ServerResponse object containing server response for this request.branch- Current Branch instance
-
handleFailure
void handleFailure(int statusCode, String causeMsg)
Called when there is an error on executing this request. Child class should handle the failureaccordingly.
- Parameters:
statusCode- 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.
-
onRequestQueued
void onRequestQueued()
Called when request is added to teh queue
-
isGetRequest
boolean isGetRequest()
Specify whether the request is a GET or POST. Child class has to implement accordingly.
-
clearCallbacks
void clearCallbacks()
Clears the callbacks associated to this request.
-
-
-
-