C
- the type of data used to configure the load from the proxypublic class HttpProxy<C> extends Object implements DataProxy<C,String>
DataProxy
that retrieves data using a RequestBuilder
instance.
When using a load config object that implements LoadConfig
or
ModelData
, all properties and property values will be sent as
request parameters in the load request.RequestBuilder
,
ScriptTagProxy
Constructor and Description |
---|
HttpProxy(RequestBuilder builder)
Creates a new HttpProxy.
|
Modifier and Type | Method and Description |
---|---|
DataWriter<C,String> |
getWriter()
Returns the data writer for this proxy.
|
void |
load(C loadConfig,
Callback<String,Throwable> callback)
Data should be retrieved using the specified load config.
|
void |
setWriter(DataWriter<C,String> writer)
Sets the data writer for this proxy.
|
public HttpProxy(RequestBuilder builder)
builder
- the request builder. The URL must be set to the URL of the
service. For requests that use the HTTP GET method, the URL should
be set to the base part of the URL. It will be updated
automatically to include the encoded request.public DataWriter<C,String> getWriter()
public void load(C loadConfig, Callback<String,Throwable> callback)
DataProxy
DataReader
can be used to "process" the raw data.public void setWriter(DataWriter<C,String> writer)
writer
- the data writerCopyright © 2015. All rights reserved.