Interface DataLoader
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CommonsDataLoader,FileCacheDataLoader,IgnoreDataLoader,MemoryDataLoader,NativeHTTPDataLoader,OCSPDataLoader,TimestampDataLoader
Component that allows to retrieve the data using any protocol: HTTP, HTTPS, FTP, LDAP.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThis is an internal class used to model the couple data and url used to obtain this data. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Execute a HTTP GET operation.byte[]Deprecated.since 5.12.Execute a HTTP GET operation.byte[]Executes a HTTP POST operationvoidsetContentType(String contentType) This allows to set the content type.
-
Method Details
-
get
Execute a HTTP GET operation.- Parameters:
url- the url to access- Returns:
bytearray of obtained data or null
-
get
Execute a HTTP GET operation. This method is used when many URls are available to access the same resource. The operation stops after the first successful download.- Parameters:
urlStrings-ListofStrings representing the URLs to be used in sequential way to obtain the data.- Returns:
DataAndUrlrepresenting the array of obtained data and used url, or null
-
get
Deprecated.since 5.12. To be removed in DSS 5.13. Use#get(url)for no cache, or an alternative DataLoader providing caching functionality.Execute a HTTP GET operation with indication concerning the mandatory nature of the operation.- Parameters:
url- to accessrefresh- if true indicates that the cached data should be refreshed- Returns:
bytearray of obtained data or null
-
post
Executes a HTTP POST operation- Parameters:
url- to accesscontent- the content to post- Returns:
bytearray of obtained data
-
setContentType
This allows to set the content type. Example: Content-Type "application/ocsp-request"- Parameters:
contentType- to set the Content-Type
-