bes
Updated for version 3.20.6
|
#include <RemoteHttpResource.h>
Public Member Functions | |
std::string | getCacheFileName () |
std::vector< std::string > * | getResponseHeaders () |
std::string | getType () |
RemoteHttpResource (const std::string &url) | |
void | retrieveResource () |
virtual | ~RemoteHttpResource () |
This class encapsulates a remote resource available via HTTP GET. It will retrieve the content of the resource and place it in a local disk cache for rapid (subsequent) access. It can be configure to use a proxy server for the outgoing requests.
Definition at line 49 of file gateway_module/RemoteHttpResource.h.
RemoteHttpResource::RemoteHttpResource | ( | const std::string & | url | ) |
Builds a RemoteHttpResource object associated with the passed url
parameter.
url | Is a URL string that identifies the remote resource. |
Definition at line 50 of file gateway_module/RemoteHttpResource.cc.
|
virtual |
Releases any memory resources and also any existing cache file locks for the cached resource. ( Closes the file descriptor opened when retrieveResource() was called.)
Definition at line 86 of file gateway_module/RemoteHttpResource.cc.
|
inline |
Returns the (read-locked) cache file name on the local system in which the content of the remote resource is stored. Deleting of the instance of this class will release the read-lock.
Definition at line 118 of file gateway_module/RemoteHttpResource.h.
|
inline |
Returns a std::vector of HTTP headers received along with the response from the request for the remote resource..
Definition at line 129 of file gateway_module/RemoteHttpResource.h.
|
inline |
Returns the DAP type std::string of the RemoteHttpResource
Definition at line 109 of file gateway_module/RemoteHttpResource.h.
void RemoteHttpResource::retrieveResource | ( | ) |
This method will check the cache for the resource. If it's not there then it will lock the cache and retrieve the remote resource content using HTTP GET.
When this method returns the RemoteHttpResource object is fully initialized and the cache file name for the resource is available along with an open file descriptor for the (now read-locked) cache file.
Definition at line 124 of file gateway_module/RemoteHttpResource.cc.