|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jakewharton.apibuilder.ApiBuilder
com.jakewharton.domainr.DomainrApiBuilder<T>
T
- Native class type of the HTTP method call result.public abstract class DomainrApiBuilder<T>
Domainr-specific API builder extension which provides helper methods for adding fields, parameters, and post-parameters commonly used in the API.
Field Summary |
---|
Fields inherited from class com.jakewharton.apibuilder.ApiBuilder |
---|
API_URL_DELIMITER_END, API_URL_DELIMITER_START |
Constructor Summary | |
---|---|
DomainrApiBuilder(DomainrApiService service,
com.google.gson.reflect.TypeToken<T> token,
String urlFormat)
Initialize a new builder for the specified HTTP method and API version. |
Method Summary | |
---|---|
protected com.google.gson.JsonElement |
execute()
Execute the remote API method and return the JSON object result. |
T |
fire()
Execute remote API method and unmarshall the result to its native type. |
Methods inherited from class com.jakewharton.apibuilder.ApiBuilder |
---|
buildUrl, buildUrl, encodeUrl, field, field, field, field, field, hasField, hasParameter, parameter, parameter, parameter, parameter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomainrApiBuilder(DomainrApiService service, com.google.gson.reflect.TypeToken<T> token, String urlFormat)
service
- Service to bind to.token
- Return type token.urlFormat
- URL format string.Method Detail |
---|
public final T fire()
protected com.google.gson.JsonElement execute()
Execute the remote API method and return the JSON object result.
This method can be overridden to select a specific subset of the JSON object. The overriding implementation should still call 'super.execute()' and then perform the filtering from there.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |