TKN Logo SelfSoft Logo

Total Knowledge

SelfSoft, Inc.

CPPSERV

[CPPSERV] [Documentation] [Download] [Contact] [Bug tracker] [News] [RSS Feed] [gitweb]

container::ServerConfig Class Reference

#include <serverconfig.h>

Inheritance diagram for container::ServerConfig:

Inheritance graph
[legend]
Collaboration diagram for container::ServerConfig:

Collaboration graph
[legend]
List of all members.

Public Types

enum  paramflags_t { PARAM_REQUIRED = 0x1, PARAM_INHERITABLE = 0x2 }

Public Member Functions

 ServerConfig ()
virtual ~ServerConfig ()
void processConfig ()
bool setGlobalParam (const std::string &type, const std::string &value)
std::string getGlobalParam (const std::string &type)
RequestListenergetListener ()
AppgetApp (const std::string &name)

Static Public Member Functions

static void fart (const char *) throw (servlet::ServletException)

Protected Member Functions

virtual ConfigNode::childlist_t getNodes (const ConfigNode *parent)=0
virtual ConfigNode::childlist_t getNodes (const ConfigNode *parent, const std::string &type)=0

Protected Attributes

ConfigNoderoot

Private Types

typedef ContextRegistry::createcontext_f createcontext_f

Private Attributes

GlobalContext globalContext

Classes

class  AppContext
class  ConfigNode
class  Context
class  ContextRegistry
class  CSPContext
class  GlobalContext
class  ParamRegistry
class  ServletContext

Detailed Description

This is interface that all config parsers should implement. It's rather generic.
Author:
Ilya A. Volynets-Evenbakh

Definition at line 48 of file serverconfig.h.


Member Typedef Documentation


Member Enumeration Documentation

Describes scopes of parameter. If parameter can be set in multiple scopes, servlet scope overrides app scope, and app scope overrides global scope

Enumerator:
PARAM_REQUIRED 
PARAM_INHERITABLE 

Definition at line 95 of file serverconfig.h.


Constructor & Destructor Documentation

container::ServerConfig::ServerConfig (  ) 

Definition at line 31 of file serverconfig.cpp.

container::ServerConfig::~ServerConfig (  )  [virtual]

Definition at line 38 of file serverconfig.cpp.


Member Function Documentation

void container::ServerConfig::processConfig (  ) 

This function is called by main appserver object in order to create all the applications, servlets, etc. In a way this one can be viewed as real entry point, and main &Co are just a bootstraps.

Definition at line 49 of file serverconfig.cpp.

References container::ServerConfig::Context::complete(), fart(), globalContext, container::ServerConfig::Context::process(), and root.

Referenced by container::CServDemon::parseOptions().

Here is the call graph for this function:

void container::ServerConfig::fart ( const char *   )  throw (servlet::ServletException) [static]

bool container::ServerConfig::setGlobalParam ( const std::string &  type,
const std::string &  value 
)

Definition at line 431 of file serverconfig.cpp.

References globalContext, and container::ServerConfig::GlobalContext::setGlobalParam().

Referenced by container::CServDemon::parseOptions().

Here is the call graph for this function:

std::string container::ServerConfig::getGlobalParam ( const std::string &  type  ) 

Definition at line 438 of file serverconfig.cpp.

References container::ServerConfig::GlobalContext::getGlobalParam(), and globalContext.

Here is the call graph for this function:

container::ServerConfig::getListener (  )  [inline]

Returns request listener object from global context

Definition at line 111 of file serverconfig.h.

References container::ServerConfig::GlobalContext::getListener(), and globalContext.

Referenced by container::CServDemon::run().

Here is the call graph for this function:

container::ServerConfig::getApp ( const std::string &  name  )  [inline]

Returns named application (ServletContext implementation) object

Definition at line 117 of file serverconfig.h.

References container::ServerConfig::GlobalContext::getApp(), and globalContext.

Referenced by container::App::getContext(), and container::ServerConfig::ServletContext::onPostComplete().

Here is the call graph for this function:

container::ServerConfig::getNodes ( const ConfigNode parent  )  [protected, pure virtual]

container::ServerConfig::getNodes ( const ConfigNode parent,
const std::string &  type 
) [protected, pure virtual]

Returns list of child nodes of parent. This function must be overriden by derived classes to provide access to actual configuration storage

Parameters:
parent Node whose children to return
type Type of nodes to return (i.e. param, app, servlet, etc..)
Returns:
ConfigNode::childlist_t - list of child nodes


Member Data Documentation

This is root node of configuration. Initially set to NULL, and must be initalized by derived class (either in constructor, or at first call to getNodes(). This member should never be used directly by base class.

Definition at line 86 of file serverconfig.h.

Referenced by container::XMLServerConfig::load(), processConfig(), and container::XMLServerConfig::~XMLServerConfig().


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

SourceForge.net Logo

Authoright © Total Knowledge: 2001-2004