| Constructor and Description |
|---|
RestAdapter(Class<T> klass,
URL baseURL) |
RestAdapter(Class<T> klass,
URL baseURL,
com.google.gson.GsonBuilder gsonBuilder) |
RestAdapter(Class<T> klass,
URL baseURL,
com.google.gson.GsonBuilder gsonBuilder,
PageConfig pageconfig) |
RestAdapter(Class<T> klass,
URL baseURL,
PageConfig pageconfig) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDataRoot() |
ParameterProvider |
getParameterProvider() |
PipeType |
getType()
Returns the connection type of this
Pipe object (e.g. |
URL |
getUrl()
|
void |
read(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.
|
void |
setAuthenticationModule(AuthenticationModule module)
Sets the authentication module for the Pipe.
|
protected void |
setDataRoot(String dataRoot) |
void |
setEncoding(Charset encoding)
Sets the encoding of the Pipe.
|
protected void |
setParameterProvider(ParameterProvider parameterProvider) |
public RestAdapter(Class<T> klass, URL baseURL, com.google.gson.GsonBuilder gsonBuilder)
public RestAdapter(Class<T> klass, URL baseURL, PageConfig pageconfig)
public RestAdapter(Class<T> klass, URL baseURL, com.google.gson.GsonBuilder gsonBuilder, PageConfig pageconfig)
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 void setAuthenticationModule(AuthenticationModule module)
PipesetAuthenticationModule in interface Pipe<T>public void setEncoding(Charset encoding)
encoding - IllegalArgumentException - if encoding is nullpublic String getDataRoot()
protected void setDataRoot(String dataRoot)
public ParameterProvider getParameterProvider()
protected void setParameterProvider(ParameterProvider parameterProvider)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.