Package com.vk.api.sdk.client
Class ApiRequest<T>
- java.lang.Object
-
- com.vk.api.sdk.client.ApiRequest<T>
-
- Direct Known Subclasses:
AbstractQueryBuilder,LongPollQueryBuilder,UploadQueryBuilder
public abstract class ApiRequest<T> extends java.lang.ObjectCreated by tsivarev on 21.07.16.
-
-
Constructor Summary
Constructors Constructor Description ApiRequest(java.lang.String url, TransportClient client, com.google.gson.Gson gson, int retryAttempts, java.lang.reflect.Type responseClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Texecute()ClientResponseexecuteAsRaw()java.lang.StringexecuteAsString()protected abstract java.lang.StringgetBody()protected TransportClientgetClient()protected com.google.gson.GsongetGson()protected org.apache.http.Header[]getHeaders()java.lang.reflect.TypegetResponseClass()java.lang.StringgetUrl()ApiRequest<T>setHeaders(org.apache.http.Header[] headers)
-
-
-
Constructor Detail
-
ApiRequest
public ApiRequest(java.lang.String url, TransportClient client, com.google.gson.Gson gson, int retryAttempts, java.lang.reflect.Type responseClass)
-
-
Method Detail
-
setHeaders
public ApiRequest<T> setHeaders(org.apache.http.Header[] headers)
-
getHeaders
protected org.apache.http.Header[] getHeaders()
-
getUrl
public java.lang.String getUrl()
-
getGson
protected com.google.gson.Gson getGson()
-
getClient
protected TransportClient getClient()
-
getResponseClass
public java.lang.reflect.Type getResponseClass()
-
execute
public T execute() throws ApiException, ClientException
- Throws:
ApiExceptionClientException
-
executeAsString
public java.lang.String executeAsString() throws ClientException- Throws:
ClientException
-
executeAsRaw
public ClientResponse executeAsRaw() throws ClientException
- Throws:
ClientException
-
getBody
protected abstract java.lang.String getBody()
-
-