#include <ErrorDetailManager.h>

Collaboration diagram for Ssl::ErrorDetailsManager:

Public Member Functions

 ErrorDetailsManager ()
bool getErrorDetail (Security::ErrorCode value, const HttpRequest::Pointer &request, ErrorDetailEntry &entry)
const char * getDefaultErrorDescr (Security::ErrorCode value)
 the default error description for a given error More...
const char * getDefaultErrorDetail (Security::ErrorCode value)
 the default error details for a given error More...

Static Public Member Functions

static ErrorDetailsManagerGetInstance ()
 Instance class. More...
static void Shutdown ()
 reset the ErrorDetailsManager instance More...

Private Types

typedef std::map< std::string, ErrorDetailsList::PointerCache

Private Member Functions

ErrorDetailsList::Pointer getCachedDetails (const char *lang)
 Return cached error details list for a given language if exist. More...
void cacheDetails (ErrorDetailsList::Pointer &errorDetails)
 cache the given error details list. More...

Private Attributes

Cache cache
 the error details list cache More...
ErrorDetailsList::Pointer theDefaultErrorDetails
 the default error details list More...

Static Private Attributes

static ErrorDetailsManagerTheDetailsManager = NULL
 An instance of ErrorDetailsManager to be used by squid (ssl/ErrorDetails.*) More...

Detailed Description

It is used to load, manage and query multiple ErrorDetailLists objects.

Definition at line 59 of file ErrorDetailManager.h.

Member Typedef Documentation

◆ Cache

typedef std::map<std::string, ErrorDetailsList::Pointer> Ssl::ErrorDetailsManager::Cache

Definition at line 86 of file ErrorDetailManager.h.

Constructor & Destructor Documentation

◆ ErrorDetailsManager()

Ssl::ErrorDetailsManager::ErrorDetailsManager ( )

Definition at line 97 of file ErrorDetailManager.cc.

References TemplateFile::loadDefault().

Member Function Documentation

◆ cacheDetails()

void Ssl::ErrorDetailsManager::cacheDetails ( ErrorDetailsList::Pointer errorDetails)

◆ getCachedDetails()

Ssl::ErrorDetailsList::Pointer Ssl::ErrorDetailsManager::getCachedDetails ( const char *  lang)

Definition at line 104 of file ErrorDetailManager.cc.

References debugs, HERE(), and NULL.

◆ getDefaultErrorDescr()

const char * Ssl::ErrorDetailsManager::getDefaultErrorDescr ( Security::ErrorCode  value)

Definition at line 166 of file ErrorDetailManager.cc.

◆ getDefaultErrorDetail()

const char * Ssl::ErrorDetailsManager::getDefaultErrorDetail ( Security::ErrorCode  value)

Definition at line 172 of file ErrorDetailManager.cc.

◆ getErrorDetail()

bool Ssl::ErrorDetailsManager::getErrorDetail ( Security::ErrorCode  value,
const HttpRequest::Pointer request,
ErrorDetailEntry entry 

Retrieve error details for an error. This method examine the Accept-Language of the request to retrieve the error details for requested language else return the default error details.

valuethe error code
requestthe current HTTP request.
entrywhere to store error details
true on success, false otherwise

Definition at line 125 of file ErrorDetailManager.cc.

References Http::ACCEPT_LANGUAGE, debugs, Ssl::ErrorDetailsList::errLanguage, Ssl::GetErrorName(), Ssl::ErrorDetailsList::getRecord(), HERE(), TemplateFile::language(), TemplateFile::loadFor(), NULL, request(), and strHdrAcptLangGetItem().

◆ GetInstance()

Ssl::ErrorDetailsManager & Ssl::ErrorDetailsManager::GetInstance ( )

Definition at line 82 of file ErrorDetailManager.cc.

References assert.

Referenced by Ssl::errorDetailInitialize(), and Security::ErrorDetail::verbose().

◆ Shutdown()

void Ssl::ErrorDetailsManager::Shutdown ( )

Definition at line 91 of file ErrorDetailManager.cc.

References NULL.

Referenced by Ssl::errorDetailClean().

Member Data Documentation

◆ cache

Cache Ssl::ErrorDetailsManager::cache

Definition at line 87 of file ErrorDetailManager.h.

◆ theDefaultErrorDetails

ErrorDetailsList::Pointer Ssl::ErrorDetailsManager::theDefaultErrorDetails

Definition at line 88 of file ErrorDetailManager.h.

◆ TheDetailsManager

Ssl::ErrorDetailsManager * Ssl::ErrorDetailsManager::TheDetailsManager = NULL

Definition at line 91 of file ErrorDetailManager.h.

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






Web Site Translations