T
- The data type of the Pipe
operationpublic interface Pipe<T>
Pipe
represents a server connection. An object of this class is responsible to communicate
with the server in order to perform read/write operations.Modifier and Type | Method and Description |
---|---|
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 |
URL |
getUrl()
|
void |
read(org.jboss.aerogear.android.core.Callback<List<T>> callback)
Sends a signal to the Pipe to read its data and return it via the callback.
|
void |
read(org.jboss.aerogear.android.core.ReadFilter filter,
org.jboss.aerogear.android.core.Callback<List<T>> callback)
Reads all the data from the underlying server connection.
|
void |
read(String id,
org.jboss.aerogear.android.core.Callback<T> callback)
Sends a signal to the Pipe to read data by id and return it via the callback.
|
void |
remove(String id,
org.jboss.aerogear.android.core.Callback<Void> callback)
Removes an object from the underlying server connection.
|
void |
save(T item,
org.jboss.aerogear.android.core.Callback<T> callback)
Saves or updates a given object on the server.
|
URL getUrl()
void read(String id, org.jboss.aerogear.android.core.Callback<T> callback)
id
- representing the ‘id’ of the objectcallback
- The callback for consuming the result from the Pipe
invocation.void read(org.jboss.aerogear.android.core.Callback<List<T>> callback)
callback
- The callback for consuming the result from the Pipe
invocation.void read(org.jboss.aerogear.android.core.ReadFilter filter, org.jboss.aerogear.android.core.Callback<List<T>> callback)
filter
- a ReadFilter
for performing pagination and querying.callback
- The callback for consuming the result from the Pipe
invocation.void save(T item, org.jboss.aerogear.android.core.Callback<T> callback)
item
- the item to save or updatecallback
- The callback for consuming the result from the Pipe
invocation.void remove(String id, org.jboss.aerogear.android.core.Callback<Void> callback)
id
- representing the ‘id’ of the object to be removedcallback
- The callback for consuming the result from the Pipe
invocation.PipeHandler<T> getHandler()
RequestBuilder<T> getRequestBuilder()
RequestBuilder
is responsible for turning objects in bodies of requests.ResponseParser<T> getResponseParser()
ResponseParser
is responsible for turning responses from a SAVE into an objectCopyright © 2016 JBoss by Red Hat. All rights reserved.