|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.globo.dnsapi.AbstractAPI<T>
public abstract class AbstractAPI<T>
| Constructor Summary | |
|---|---|
protected |
AbstractAPI(DNSAPI dnsapi)
|
| Method Summary | ||
|---|---|---|
protected com.google.api.client.http.HttpRequestFactory |
buildHttpRequestFactory()
Customize HttpRequestFactory with authentication and error handling. |
|
protected com.google.api.client.http.GenericUrl |
buildUrl(String suffixUrl)
|
|
protected DNSAPIRoot<T> |
delete(String suffixUrl,
boolean returnsList)
|
|
protected DNSAPIRoot<T> |
get(String suffixUrl,
boolean returnsList)
|
|
protected DNSAPI |
getDnsapi()
|
|
protected abstract Type |
getListType()
|
|
protected abstract Type |
getType()
|
|
protected void |
handleExceptionIfNeeded(com.google.api.client.http.HttpResponse response)
Exception treatment for generic calls |
|
protected void |
insertAuthenticationHeaders(com.google.api.client.http.HttpRequest request)
|
|
protected void |
interceptRequest(com.google.api.client.http.HttpRequest request)
Run before each request runs. |
|
protected void |
interceptResponse(com.google.api.client.http.HttpResponse response)
Run after each request complete (with or without success). |
|
protected
|
parse(com.google.api.client.http.HttpResponse response,
Type type)
|
|
protected
|
parse(String responseAsString,
Type type)
Convert an HttpResponse object to DNSAPIRoot of E object. |
|
protected DNSAPIRoot<T> |
post(String suffixUrl,
Object payload,
boolean returnsList)
|
|
protected DNSAPIRoot<T> |
put(String suffixUrl,
Object payload,
boolean returnsList)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractAPI(DNSAPI dnsapi)
| Method Detail |
|---|
protected DNSAPI getDnsapi()
protected abstract Type getType()
protected abstract Type getListType()
protected com.google.api.client.http.HttpRequestFactory buildHttpRequestFactory()
protected void interceptRequest(com.google.api.client.http.HttpRequest request)
request - protected void insertAuthenticationHeaders(com.google.api.client.http.HttpRequest request)
protected void interceptResponse(com.google.api.client.http.HttpResponse response)
throws DNSAPIException,
IOException
response -
DNSAPIException
IOException
protected void handleExceptionIfNeeded(com.google.api.client.http.HttpResponse response)
throws DNSAPIException,
IOException
statusCode - responseAsString -
IOException
NetworkAPIException
DNSAPIException
protected <E> DNSAPIRoot<E> parse(String responseAsString,
Type type)
throws DNSAPIException
response - type -
DNSAPIException
protected <E> DNSAPIRoot<E> parse(com.google.api.client.http.HttpResponse response,
Type type)
throws DNSAPIException
DNSAPIExceptionprotected com.google.api.client.http.GenericUrl buildUrl(String suffixUrl)
protected DNSAPIRoot<T> get(String suffixUrl,
boolean returnsList)
throws DNSAPIException
DNSAPIException
protected DNSAPIRoot<T> post(String suffixUrl,
Object payload,
boolean returnsList)
throws DNSAPIException
DNSAPIException
protected DNSAPIRoot<T> put(String suffixUrl,
Object payload,
boolean returnsList)
throws DNSAPIException
DNSAPIException
protected DNSAPIRoot<T> delete(String suffixUrl,
boolean returnsList)
throws DNSAPIException
DNSAPIException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||