|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
This class encapsulates a remote resource available via HTTP GET. More...
#include <RemoteHttpResource.h>

Public Member Functions | |
| string | getCacheFileName () |
| Returns the (read-locked) cache file name on the local system in which the content of the remote resource is stored. More... | |
| vector< string > * | getResponseHeaders () |
| Returns a vector of HTTP headers received along with the response from the request for the remote resource. More... | |
| string | getType () |
| Returns the DAP type string of the RemoteHttpResource. More... | |
| RemoteHttpResource (const string &url) | |
Builds a RemoteHttpResource object associated with the passed url parameter. More... | |
| void | retrieveResource () |
| This method will check the cache for the resource. More... | |
| virtual | ~RemoteHttpResource () |
| Releases any memory resources and also any existing cache file locks for the cached resource. More... | |
Protected Member Functions | |
| RemoteHttpResource () | |
This class encapsulates a remote resource available via HTTP GET.
It willb 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 53 of file RemoteHttpResource.h.
|
inlineprotected |
Definition at line 124 of file RemoteHttpResource.h.
| gateway::RemoteHttpResource::RemoteHttpResource | ( | const 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 64 of file RemoteHttpResource.cc.
References BESDEBUG, libcurl::configureProxy(), and libcurl::init().

|
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 108 of file 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 154 of file RemoteHttpResource.h.
Referenced by GatewayContainer::access(), and GatewayContainer::dump().
|
inline |
Returns a vector of HTTP headers received along with the response from the request for the remote resource.
Definition at line 163 of file RemoteHttpResource.h.
Referenced by GatewayContainer::dump().
|
inline |
Returns the DAP type string of the RemoteHttpResource.
Definition at line 146 of file RemoteHttpResource.h.
Referenced by GatewayContainer::access().
| void gateway::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 147 of file RemoteHttpResource.cc.
References BESDEBUG, BESFileLockingCache::cache_too_big(), BESFileLockingCache::create_and_lock(), BESFileLockingCache::exclusive_to_shared_lock(), BESFileLockingCache::get_cache_file_name(), BESCache3::get_instance(), BESFileLockingCache::get_read_lock(), GatewayUtils::Get_type_from_url(), TheBESKeys::TheKeys(), BESFileLockingCache::unlock_cache(), BESFileLockingCache::update_and_purge(), and BESFileLockingCache::update_cache_info().
Referenced by GatewayContainer::access().
