|
AeroGear Android Libary 1.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The data type of the Pipe operationpublic interface Pipe<T>
A Pipe represents a server connection. An object of this class is responsible to communicate
with the server in order to perform read/write operations.
| 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()
|
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 |
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 item,
Callback<T> callback)
Saves or updates a given object on the server. |
| Method Detail |
|---|
PipeType getType()
Pipe object (e.g. REST).
URL getUrl()
URL to which this Pipe object points.
void read(Callback<List<T>> callback)
callback - The callback for consuming the result from the Pipe invocation.
void readWithFilter(ReadFilter filter,
Callback<List<T>> callback)
callback - The callback for consuming the result from the Pipe invocation.filter - a ReadFilter for performing pagination and querying.
void save(T item,
Callback<T> callback)
item - the item to save or updatecallback - The callback for consuming the result from the Pipe invocation.
void remove(String id,
Callback<Void> callback)
id - representing the ‘id’ of the object to be removedcallback - The callback for consuming the result from the Pipe invocation.com.google.gson.Gson getGson()
Class<T> getKlass()
PipeHandler<T> getHandler()
|
AeroGear Android Libary 1.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||