|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aerogear.android.impl.pipeline.RestAdapter<T>
public final class RestAdapter<T>
Rest implementation of Pipe.
| Field Summary | |
|---|---|
static Executor |
THREAD_POOL_EXECUTOR
|
| Constructor Summary | |
|---|---|
RestAdapter(Class<T> klass,
URL baseURL)
|
|
RestAdapter(Class<T> klass,
URL baseURL,
PipeConfig config)
|
|
| Method Summary | |
|---|---|
com.google.gson.Gson |
getGson()
Returns the GSON serializer used to serialized instances of objects. |
PipeHandler<T> |
getHandler()
Returns the instance which is responsible for handling read, save, and remove. |
Class<T> |
getKlass()
|
RequestBuilder<T> |
getRequestBuilder()
The RequestBuilder is responsible for turning objects in bodies of requests. |
ResponseParser<T> |
getResponseParser()
The ResponseParser is responsible for turning responses from a SAVE into an object |
PipeType |
getType()
Returns the connection type of this Pipe object (e.g. |
URL |
getUrl()
Returns the URL to which this Pipe object points. |
void |
read(Callback<List<T>> callback)
Sends a signal to the Pipe to read its data and return it via the callback. |
void |
read(ReadFilter filter,
Callback<List<T>> callback)
Reads all the data from the underlying server connection. |
void |
readWithFilter(ReadFilter filter,
Callback<List<T>> callback)
Reads all the data from the underlying server connection. |
void |
remove(String id,
Callback<Void> callback)
Removes an object from the underlying server connection. |
void |
save(T data,
Callback<T> callback)
Saves or updates a given object on the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Executor THREAD_POOL_EXECUTOR
| Constructor Detail |
|---|
public RestAdapter(Class<T> klass,
URL baseURL)
public RestAdapter(Class<T> klass,
URL baseURL,
PipeConfig config)
| Method Detail |
|---|
public PipeType getType()
Pipe object (e.g. REST).
getType in interface Pipe<T>public URL getUrl()
URL to which this Pipe object points.
getUrl in interface Pipe<T>
public void readWithFilter(ReadFilter filter,
Callback<List<T>> callback)
Pipe
readWithFilter in interface Pipe<T>filter - a ReadFilter for performing pagination and querying.callback - The callback for consuming the result from the Pipe invocation.
public void read(ReadFilter filter,
Callback<List<T>> callback)
Pipe
read in interface Pipe<T>filter - a ReadFilter for performing pagination and querying.callback - The callback for consuming the result from the Pipe invocation.public void read(Callback<List<T>> callback)
read in interface Pipe<T>callback - The callback for consuming the result from the Pipe invocation.
public void save(T data,
Callback<T> callback)
Pipe
save in interface Pipe<T>data - the item to save or updatecallback - The callback for consuming the result from the Pipe invocation.
public void remove(String id,
Callback<Void> callback)
remove in interface Pipe<T>id - representing the ‘id’ of the object to be removedcallback - The callback for consuming the result from the Pipe invocation.public PipeHandler<T> getHandler()
Pipe
getHandler in interface Pipe<T>public Class<T> getKlass()
getKlass in interface Pipe<T>public com.google.gson.Gson getGson()
Pipe
getGson in interface Pipe<T>public RequestBuilder<T> getRequestBuilder()
PipeRequestBuilder is responsible for turning objects in bodies of requests.
getRequestBuilder in interface Pipe<T>public ResponseParser<T> getResponseParser()
PipeResponseParser is responsible for turning responses from a SAVE into an object
getResponseParser in interface Pipe<T>
|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||