public interface DataLoader extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static class |
DataLoader.DataAndUrl
This is an internal class used to model the couple data and url used to obtain this data.
|
| Modifier and Type | Method and Description |
|---|---|
DataLoader.DataAndUrl |
get(List<String> urlStrings)
Execute a HTTP GET operation.
|
byte[] |
get(String url)
Execute a HTTP GET operation.
|
byte[] |
get(String url,
boolean refresh)
Execute a HTTP GET operation with indication concerning the mandatory nature of the operation.
|
byte[] |
post(String url,
byte[] content)
Executes a HTTP POST operation
|
void |
setContentType(String contentType)
This allows to set the content type.
|
byte[] get(String url)
url - the url to accessbyte array of obtained data or nullDataLoader.DataAndUrl get(List<String> urlStrings)
urlStrings - List of Strings representing the URLs to be used in sequential way to obtain the data.DataAndUrl representing the array of obtained data and used url, or nullbyte[] get(String url, boolean refresh)
url - to accessrefresh - if true indicates that the cached data should be refreshedbyte array of obtained data or nullbyte[] post(String url, byte[] content)
url - to accesscontent - the content to postbyte array of obtained datavoid setContentType(String contentType)
contentType - to set the Content-TypeCopyright © 2019. All rights reserved.