| Modifier and Type | Field and Description |
|---|---|
static Executor |
THREAD_POOL_EXECUTOR |
| Constructor and Description |
|---|
RestAdapter(Class<T> klass,
URL baseURL) |
RestAdapter(Class<T> klass,
URL baseURL,
PipeConfig config) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.Gson |
getGson()
Returns the GSON serializer used to serialized instances of objects.
|
PipeHandler |
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()
|
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 data,
Callback<T> callback)
Saves or updates a given object on the server.
|
public static final Executor THREAD_POOL_EXECUTOR
public RestAdapter(Class<T> klass, URL baseURL, PipeConfig config)
public void readWithFilter(ReadFilter filter, Callback<List<T>> callback)
PipereadWithFilter 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)
public void save(T data, Callback<T> callback)
Pipepublic void remove(String id, Callback<Void> callback)
public PipeHandler getHandler()
PipegetHandler in interface Pipe<T>Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.