bes  Updated for version 3.20.8
http::EffectiveUrlCache Class Reference
Collaboration diagram for http::EffectiveUrlCache:
Collaboration graph

Public Member Functions

virtual std::string dump () const
 dumps information about this object More...
 
virtual void dump (std::ostream &strm) const
 dumps information about this object More...
 
std::string get_effective_url (const std::string &source_url)
 

Static Public Member Functions

static EffectiveUrlCacheTheCache ()
 Get the singleton BESCatalogList instance. More...
 

Friends

class EffectiveUrlCacheTest
 

Detailed Description

Definition at line 60 of file EffectiveUrlCache.h.

Member Function Documentation

◆ dump() [1/2]

string http::EffectiveUrlCache::dump ( ) const
virtual

dumps information about this object

Displays the pointer value of this instance along with the catalogs registered in this list.

Parameters
strmC++ i/o stream to dump the information to

Definition at line 194 of file EffectiveUrlCache.cc.

◆ dump() [2/2]

void http::EffectiveUrlCache::dump ( std::ostream &  strm) const
virtual

dumps information about this object

Displays the pointer value of this instance along with the catalogs registered in this list.

Parameters
strmC++ i/o stream to dump the information to

Implements BESObj.

Definition at line 166 of file EffectiveUrlCache.cc.

◆ get_effective_url()

string http::EffectiveUrlCache::get_effective_url ( const std::string &  source_url)

Find the terminal (effective) url for the source_url. If the source_url matches the skip_regex then it will not be cached.

Parameters
source_url
Returns
The effective URL

Definition at line 228 of file EffectiveUrlCache.cc.

◆ TheCache()

EffectiveUrlCache * http::EffectiveUrlCache::TheCache ( )
static

Get the singleton BESCatalogList instance.

This static method returns the instance of this singleton class. It uses the protected constructor below to read the name of the default catalog from the BES's configuration file, using the key "BES.Catalog.Default". If the key is not found or the key lookup fails for any reason, it uses the the value of BES_DEFAULT_CATALOG as defined in this class' header file (currently the confusing name "catalog").

The implementation will only build one instance of CatalogList and thereafter simple return that pointer.

For this code, the default catalog is implemented suing CatalogDirectory, which exposes the BES's local POSIX file system, rooted at a place set in the BES configuration file.

Returns
A pointer to the CatalogList singleton

Definition at line 97 of file EffectiveUrlCache.cc.


The documentation for this class was generated from the following files: