public class BranchRemoteInterfaceUrlConnection extends BranchRemoteInterface
BranchRemoteInterface.BranchRemoteException, BranchRemoteInterface.BranchResponseRETRY_NUMBER| Modifier and Type | Method and Description |
|---|---|
BranchRemoteInterface.BranchResponse |
doRestfulGet(java.lang.String url)
Abstract method to implement the network layer to do a RESTful GET to Branch servers.
|
BranchRemoteInterface.BranchResponse |
doRestfulPost(java.lang.String url,
org.json.JSONObject payload)
Abstract method to implement the network layer to do a RESTful GET to Branch servers.
|
getDefaultBranchRemoteInterface, make_restful_get, make_restful_postpublic BranchRemoteInterface.BranchResponse doRestfulGet(java.lang.String url) throws BranchRemoteInterface.BranchRemoteException
BranchRemoteInterfaceAbstract method to implement the network layer to do a RESTful GET to Branch servers. This method is called whenever Branch SDK want to make a GET request to Branch servers. Please note that this methods always called on the background thread and no need for thread switching for the network operations.
doRestfulGet in class BranchRemoteInterfaceurl - The url end pointBranchRemoteInterface.BranchResponse with the get result data and http status codeBranchRemoteInterface.BranchRemoteException - Branch remote exception is thrown when there is an error in communicating to the Branch servers
BranchRemoteException contains the corresponding BranchError code for the error BranchError.ERR_BRANCH_NO_CONNECTIVITY | BranchError.ERR_BRANCH_REQ_TIMED_OUT
see BranchRemoteInterface.BranchRemoteException
BranchRemoteInterface.BranchResponse
NOTE: For better debugging purpose conside adding BranchRemoteInterface.RETRY_NUMBER as a query params if you implement multiple retries for your request
public BranchRemoteInterface.BranchResponse doRestfulPost(java.lang.String url, org.json.JSONObject payload) throws BranchRemoteInterface.BranchRemoteException
BranchRemoteInterfaceAbstract method to implement the network layer to do a RESTful GET to Branch servers. This method is called whenever Branch SDK want to make a GET request to Branch servers. Please note that this methods always called on the background thread and no need for thread switching to execute network operations.
doRestfulPost in class BranchRemoteInterfaceurl - The url end pointpayload - The JSon object payload for the post requestBranchRemoteInterface.BranchResponse with the get result data and http status codeBranchRemoteInterface.BranchRemoteException - Branch remote exception is thrown when there is an error in communicating to the Branch servers
BranchRemoteException contains the corresponding BranchError code for the error BranchError.ERR_BRANCH_NO_CONNECTIVITY | BranchError.ERR_BRANCH_REQ_TIMED_OUT
see BranchRemoteInterface.BranchRemoteException
BranchRemoteInterface.BranchResponse
NOTE: For better debugging purpose conside adding BranchRemoteInterface.RETRY_NUMBER as a JSon keyvalue if you implement multiple retries for your request