public abstract class BaseController extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HttpCallBack |
httpCallBack
Protected variable to keep reference of httpCallBack instance if user provides any
|
| Constructor and Description |
|---|
BaseController() |
| Modifier and Type | Method and Description |
|---|---|
static HttpClient |
getClientInstance()
Shared instance of the Http client
|
HttpCallBack |
getHttpCallBack()
Get httpCallBack associated with this controller
|
static void |
setClientInstance(HttpClient client)
Shared instance of the Http client
|
void |
setHttpCallBack(HttpCallBack httpCallBack)
Set the httpCallBack for this controller
|
protected void |
validateResponse(HttpResponse response,
HttpContext context)
Validates the response against HTTP errors defined at the API level
|
protected HttpCallBack httpCallBack
public HttpCallBack getHttpCallBack()
public void setHttpCallBack(HttpCallBack httpCallBack)
httpCallBack - public static HttpClient getClientInstance()
public static void setClientInstance(HttpClient client)
client - The shared instance of the http clientprotected void validateResponse(HttpResponse response, HttpContext context) throws APIException
response - The response recievedcontext - Context of the request and the recieved responseAPIExceptionCopyright © 2017. All rights reserved.