#include <Config.h>

Inheritance diagram for Adaptation::Config:
Collaboration diagram for Adaptation::Config:

Public Types

typedef std::vector< ServiceConfigPointerServiceConfigs

Public Member Functions

 Config ()
virtual ~Config ()
void parseService (void)
void freeService (void)
void dumpService (StoreEntry *, const char *) const
ServiceConfigPointer findServiceConfig (const String &)
virtual bool finalize ()

Static Public Member Functions

static void Finalize (bool enable)
static void ParseServiceSet (void)
static void ParseServiceChain (void)
static void ParseAccess (ConfigParser &parser)
static void FreeAccess (void)
static void DumpAccess (StoreEntry *, const char *)

Public Attributes

int onoff
int service_failure_limit
time_t oldest_service_failure
int service_revival_delay
ServiceConfigs serviceConfigs

Static Public Attributes

static bool Enabled = false
static char * masterx_shared_name = NULL
static int service_iteration_limit = 16
static int send_client_ip = false
static int send_username = false
static int use_indirect_client = true
static Notes metaHeaders
 The list of configured meta headers. More...
static bool needHistory = false
 HttpRequest adaptation history should recorded. More...

Protected Member Functions

virtual void clear ()
 Removes any reference to the services from configuration. More...
virtual ServiceConfignewServiceConfig () const
 creates service configuration object that will parse and keep cfg info More...
void removeService (const String &service)
 Removes the given service from all service groups. More...
void removeRule (const String &id)
 Removes access rules of the given service or group. More...

Private Member Functions

 Config (const Config &)
Configoperator= (const Config &)
virtual ServicePointer createService (const ServiceConfigPointer &cfg)=0

Static Private Member Functions

static void ParseServiceGroup (ServiceGroupPointer group)
static void FreeServiceGroups (void)
static void DumpServiceGroups (StoreEntry *, const char *)


class AccessCheck

Detailed Description

Definition at line 27 of file Config.h.

Member Typedef Documentation

◆ ServiceConfigs

Constructor & Destructor Documentation

◆ Config() [1/2]

Adaptation::Config::Config ( )

Definition at line 308 of file Config.cc.

◆ ~Config()

Adaptation::Config::~Config ( )

Reimplemented in Adaptation::Ecap::Config, and Adaptation::Icap::Config.

Definition at line 315 of file Config.cc.

References freeService().

◆ Config() [2/2]

Adaptation::Config::Config ( const Config )

Member Function Documentation

◆ clear()

void Adaptation::Config::clear ( )

Definition at line 119 of file Config.cc.

References Adaptation::AllGroups(), Adaptation::AllRules(), debugs, HERE(), removeService(), serviceConfigs, and size.

Referenced by finalize().

◆ createService()

virtual ServicePointer Adaptation::Config::createService ( const ServiceConfigPointer cfg)
privatepure virtual

Implemented in Adaptation::Ecap::Config, and Adaptation::Icap::Config.

Referenced by finalize().

◆ DumpAccess()

void Adaptation::Config::DumpAccess ( StoreEntry entry,
const char *  name 

◆ dumpService()

◆ DumpServiceGroups()

void Adaptation::Config::DumpServiceGroups ( StoreEntry entry,
const char *  name 

Definition at line 268 of file Config.cc.

References Adaptation::AllGroups(), i, SQUIDSTRINGPH, SQUIDSTRINGPRINT, and storeAppendPrintf().

◆ Finalize()

void Adaptation::Config::Finalize ( bool  enable)

◆ finalize()

bool Adaptation::Config::finalize ( )

Creates and starts the adaptation services. In the case the adaptation mechanism is disabled then removes any reference to the services from access rules and service groups, and returns false.

true if the services are ready and running, false otherwise

Reimplemented in Adaptation::Ecap::Config.

Definition at line 182 of file Config.cc.

References Adaptation::AllServices(), clear(), createService(), DBG_CRITICAL, debugs, Adaptation::FindService(), HERE(), i, NULL, onoff, and serviceConfigs.

Referenced by Adaptation::Ecap::Config::finalize(), mainInitialize(), and mainReconfigureFinish().

◆ findServiceConfig()

Adaptation::ServiceConfigPointer Adaptation::Config::findServiceConfig ( const String service)

Definition at line 89 of file Config.cc.

References NULL, and serviceConfigs.

◆ FreeAccess()

void Adaptation::Config::FreeAccess ( void  )

Definition at line 288 of file Config.cc.

References Adaptation::AllRules().

Referenced by freeService().

◆ freeService()

void Adaptation::Config::freeService ( void  )

◆ FreeServiceGroups()

void Adaptation::Config::FreeServiceGroups ( void  )

Definition at line 259 of file Config.cc.

References Adaptation::AllGroups().

Referenced by freeService().

◆ newServiceConfig()

Adaptation::ServiceConfig * Adaptation::Config::newServiceConfig ( ) const

Reimplemented in Adaptation::Ecap::Config.

Definition at line 52 of file Config.cc.

Referenced by parseService().

◆ operator=()

Config& Adaptation::Config::operator= ( const Config )

◆ ParseAccess()

void Adaptation::Config::ParseAccess ( ConfigParser parser)

◆ parseService()

void Adaptation::Config::parseService ( void  )

◆ ParseServiceChain()

void Adaptation::Config::ParseServiceChain ( void  )

Definition at line 245 of file Config.cc.

References ParseServiceGroup().

Referenced by parse_adaptation_service_chain_type().

◆ ParseServiceGroup()

void Adaptation::Config::ParseServiceGroup ( ServiceGroupPointer  group)

Definition at line 251 of file Config.cc.

References Adaptation::AllGroups(), assert, and NULL.

Referenced by ParseServiceChain(), and ParseServiceSet().

◆ ParseServiceSet()

void Adaptation::Config::ParseServiceSet ( void  )

Definition at line 239 of file Config.cc.

References ParseServiceGroup().

Referenced by parse_adaptation_service_set_type(), and parse_icap_class_type().

◆ removeRule()

void Adaptation::Config::removeRule ( const String id)

Definition at line 101 of file Config.cc.

References Adaptation::AllRules(), debugs, and Adaptation::AccessRule::groupId.

Referenced by removeService().

◆ removeService()

void Adaptation::Config::removeService ( const String service)

Definition at line 58 of file Config.cc.

References Adaptation::AllGroups(), debugs, i, and removeRule().

Referenced by clear().

Friends And Related Function Documentation

◆ AccessCheck

friend class AccessCheck

Definition at line 39 of file Config.h.

Member Data Documentation

◆ Enabled

bool Adaptation::Config::Enabled = false

Definition at line 42 of file Config.h.

Referenced by Finalize(), and Adaptation::AccessCheck::Start().

◆ masterx_shared_name

◆ metaHeaders

◆ needHistory

bool Adaptation::Config::needHistory = false

◆ oldest_service_failure

◆ onoff

int Adaptation::Config::onoff

Definition at line 53 of file Config.h.

Referenced by finalize(), mainInitialize(), and mainReconfigureFinish().

◆ send_client_ip

int Adaptation::Config::send_client_ip = false

◆ send_username

int Adaptation::Config::send_username = false

Definition at line 48 of file Config.h.

Referenced by Adaptation::Icap::ModXact::makeRequestHeaders().

◆ service_failure_limit

◆ service_iteration_limit

int Adaptation::Config::service_iteration_limit = 16

Definition at line 46 of file Config.h.

Referenced by Adaptation::Iterator::step().

◆ service_revival_delay

int Adaptation::Config::service_revival_delay

◆ serviceConfigs

ServiceConfigs Adaptation::Config::serviceConfigs

Definition at line 63 of file Config.h.

Referenced by clear(), finalize(), findServiceConfig(), freeService(), and parseService().

◆ use_indirect_client

int Adaptation::Config::use_indirect_client = true

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






Web Site Translations