public class RestRunner<T> extends Object implements PipeHandler<T>
| Constructor and Description |
|---|
RestRunner(Class<T> klass,
URL baseURL) |
| Modifier and Type | Method and Description |
|---|---|
protected RequestBuilder<T> |
getRequestBuilder() |
HeaderAndBody |
onRawRead(Pipe<T> requestingPipe)
This method fetches a resource on behalf of a Pipe.
|
HeaderAndBody |
onRawRead(Pipe<T> requestingPipe,
String id)
This method fetches a resource with an id on behalf of a Pipe.
|
HeaderAndBody |
onRawReadWithFilter(org.jboss.aerogear.android.core.ReadFilter filter,
Pipe<T> requestingPipe)
This method fetches a resource with an filter on behalf of a Pipe.
|
HeaderAndBody |
onRawSave(String id,
byte[] item)
This method will save data for a Pipe.
|
void |
onRemove(String id)
This method removes a resource with the id.
|
public void onRemove(String id)
PipeHandleronRemove in interface PipeHandler<T>id - the id of the resource to remove. Must not be null or empty.protected RequestBuilder<T> getRequestBuilder()
public HeaderAndBody onRawRead(Pipe<T> requestingPipe, String id)
PipeHandleronRawRead in interface PipeHandler<T>requestingPipe - the Pipe the handler is acting on behalf of.id - the id of the remote resourcepublic HeaderAndBody onRawRead(Pipe<T> requestingPipe)
PipeHandleronRawRead in interface PipeHandler<T>requestingPipe - the Pipe the handler is acting on behalf of.public HeaderAndBody onRawReadWithFilter(org.jboss.aerogear.android.core.ReadFilter filter, Pipe<T> requestingPipe)
PipeHandleronRawReadWithFilter in interface PipeHandler<T>filter - an object with various filter parameters to use during the
request.requestingPipe - the Pipe the handler is acting on behalf of.public HeaderAndBody onRawSave(String id, byte[] item)
PipeHandleronRawSave in interface PipeHandler<T>id - The id of the object to save. May be empty or null.item - data to save. This must not be null.Copyright © 2015 JBoss by Red Hat. All rights reserved.