General eCAP configuration. More...

#include <Config.h>

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

Public Types

typedef std::vector< ServiceConfigPointerServiceConfigs
 

Public Member Functions

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

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 Adaptation::ServiceConfignewServiceConfig () const
 creates service configuration object that will parse and keep cfg info More...
 
virtual void clear ()
 Removes any reference to the services from configuration. 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 Adaptation::ServicePointer createService (const ServiceConfigPointer &cfg)
 

Detailed Description

Definition at line 38 of file Config.h.

Member Typedef Documentation

◆ ServiceConfigs

Definition at line 62 of file Config.h.

Constructor & Destructor Documentation

◆ Config() [1/2]

Adaptation::Ecap::Config::Config ( )

Definition at line 18 of file Config.cc.

◆ ~Config()

Adaptation::Ecap::Config::~Config ( )
virtual

Reimplemented from Adaptation::Config.

Definition at line 22 of file Config.cc.

◆ Config() [2/2]

Adaptation::Ecap::Config::Config ( const Config )
private

Member Function Documentation

◆ clear()

void Adaptation::Config::clear ( )
protectedvirtualinherited

◆ createService()

Adaptation::ServicePointer Adaptation::Ecap::Config::createService ( const ServiceConfigPointer cfg)
privatevirtual

Implements Adaptation::Config.

Definition at line 43 of file Config.cc.

◆ DumpAccess()

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

◆ dumpService()

◆ Finalize()

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

◆ finalize()

bool Adaptation::Ecap::Config::finalize ( )
virtual

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.

Returns
true if the services are ready and running, false otherwise

Reimplemented from Adaptation::Config.

Definition at line 27 of file Config.cc.

References Adaptation::AllServices(), Adaptation::Ecap::CheckUnusedAdapterServices(), Adaptation::Config::finalize(), and Adaptation::Ecap::Host::Register().

Referenced by mainInitialize(), and mainReconfigureFinish().

◆ findServiceConfig()

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

Definition at line 89 of file Config.cc.

References NULL, and Adaptation::Config::serviceConfigs.

◆ FreeAccess()

void Adaptation::Config::FreeAccess ( void  )
staticinherited

Definition at line 288 of file Config.cc.

References Adaptation::AllRules().

Referenced by Adaptation::Config::freeService().

◆ freeService()

◆ newServiceConfig()

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

Reimplemented from Adaptation::Config.

Definition at line 37 of file Config.cc.

◆ operator=()

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

◆ ParseAccess()

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

◆ parseService()

void Adaptation::Config::parseService ( void  )
inherited

◆ ParseServiceChain()

void Adaptation::Config::ParseServiceChain ( void  )
staticinherited

Definition at line 245 of file Config.cc.

References Adaptation::Config::ParseServiceGroup().

Referenced by parse_adaptation_service_chain_type().

◆ ParseServiceSet()

void Adaptation::Config::ParseServiceSet ( void  )
staticinherited

◆ removeRule()

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

◆ removeService()

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

Definition at line 58 of file Config.cc.

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

Referenced by Adaptation::Config::clear().

Member Data Documentation

◆ Enabled

bool Adaptation::Config::Enabled = false
staticinherited

Definition at line 42 of file Config.h.

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

◆ masterx_shared_name

◆ metaHeaders

◆ needHistory

bool Adaptation::Config::needHistory = false
staticinherited

◆ oldest_service_failure

◆ onoff

int Adaptation::Config::onoff
inherited

Definition at line 53 of file Config.h.

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

◆ send_client_ip

int Adaptation::Config::send_client_ip = false
staticinherited

◆ send_username

int Adaptation::Config::send_username = false
staticinherited

Definition at line 48 of file Config.h.

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

◆ service_failure_limit

int Adaptation::Config::service_failure_limit
inherited

◆ service_iteration_limit

int Adaptation::Config::service_iteration_limit = 16
staticinherited

Definition at line 46 of file Config.h.

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

◆ service_revival_delay

int Adaptation::Config::service_revival_delay
inherited

◆ serviceConfigs

◆ use_indirect_client

int Adaptation::Config::use_indirect_client = true
staticinherited

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors