CPPSERV


Home Projects Jobs Clientele Contact
CPPSERV Documentation Download TODO Mailing lists Bug tracker News RSS Feed Browse source

container::serverconfig::GlobalContext Class Reference

#include <globalcontext.h>

Inheritance diagram for container::serverconfig::GlobalContext:
Collaboration diagram for container::serverconfig::GlobalContext:

List of all members.


Classes

class  GlobalConfigNode

Public Member Functions

 GlobalContext (ServerConfig &cfg)
 ~GlobalContext ()
bool setGlobalParam (const std::string &, const std::string &)
container::RequestListenergetListener ()
void registerApp (const std::string &name, AppContext *app)
AppContextgetApp (const std::string &name)

Protected Member Functions

virtual bool onSetParam (const ConfigNode &)
virtual ContextgetContext (const ConfigNode &node)
bool setListener (const ConfigNode &)
bool setNumThreads (const ConfigNode &)
bool setQueueDepth (const ConfigNode &)
bool onPostComplete ()

Static Private Member Functions

static void registerParams (ParamRegistry< GlobalContext > &)
static void registerContexts (ContextRegistry &)

Private Attributes

std::list< GlobalConfigNode * > m_globalNodes
std::list
< container::RequestListener::Acceptor * > 
m_acceptors
std::map< std::string,
AppContext * > 
m_apps
int m_nThreads
int m_queueDepth
container::RequestListenerm_listener
sptk::CThreadPool * m_pool

Static Private Attributes

static ContextRegistry m_contextregistry
static ParamRegistry
< GlobalContext
m_paramregistry

Detailed Description

This context handles global arguments and takes care of matching them with command line arguments, that can override config file parameters. Such command line arguments will be passed to us by ServerConfig::setGlobalParam() function.

Definition at line 48 of file globalcontext.h.


Constructor & Destructor Documentation

container::serverconfig::GlobalContext::GlobalContext ( ServerConfig cfg  ) 

container::serverconfig::GlobalContext::~GlobalContext (  ) 

Definition at line 37 of file globalcontext.cpp.

References m_acceptors, m_globalNodes, m_listener, and m_pool.


Member Function Documentation

AppContext* container::serverconfig::GlobalContext::getApp ( const std::string &  name  )  [inline]

Definition at line 102 of file globalcontext.h.

References m_apps.

Referenced by container::serverconfig::ServerConfig::getApp().

virtual Context* container::serverconfig::GlobalContext::getContext ( const ConfigNode node  )  [inline, protected, virtual]

Implements container::serverconfig::Context.

Definition at line 90 of file globalcontext.h.

References container::serverconfig::ContextRegistry::getContext(), and m_contextregistry.

Here is the call graph for this function:

container::RequestListener* container::serverconfig::GlobalContext::getListener (  )  [inline]

Definition at line 100 of file globalcontext.h.

References m_listener.

Referenced by container::serverconfig::ServerConfig::getListener().

bool container::serverconfig::GlobalContext::onPostComplete (  )  [protected, virtual]

called after child contexts' complete()

Reimplemented from container::serverconfig::Context.

Definition at line 185 of file globalcontext.cpp.

References m_acceptors, m_listener, m_nThreads, m_pool, and m_queueDepth.

bool container::serverconfig::GlobalContext::onSetParam ( const ConfigNode node  )  [protected, virtual]

Implements container::serverconfig::Context.

Definition at line 58 of file globalcontext.cpp.

References m_paramregistry, and container::serverconfig::ParamRegistry< T >::setParam().

Here is the call graph for this function:

void container::serverconfig::GlobalContext::registerApp ( const std::string &  name,
AppContext app 
) [inline]

Definition at line 101 of file globalcontext.h.

References m_apps.

Referenced by container::serverconfig::AppContext::onPreComplete().

void container::serverconfig::GlobalContext::registerContexts ( ContextRegistry reg  )  [static, private]

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

Definition at line 76 of file globalcontext.cpp.

References m_globalNodes, and container::serverconfig::Context::setParam().

Referenced by container::serverconfig::ServerConfig::setGlobalParam().

Here is the call graph for this function:

bool container::serverconfig::GlobalContext::setListener ( const ConfigNode node  )  [protected]

Definition at line 89 of file globalcontext.cpp.

References container::serverconfig::ConfigNode::getAttrs(), m_acceptors, and servlet::Traceable::printStackTrace().

Referenced by registerParams().

Here is the call graph for this function:

bool container::serverconfig::GlobalContext::setNumThreads ( const ConfigNode node  )  [protected]

Definition at line 154 of file globalcontext.cpp.

References container::serverconfig::ConfigNode::getAttrs(), and m_nThreads.

Referenced by registerParams().

Here is the call graph for this function:

bool container::serverconfig::GlobalContext::setQueueDepth ( const ConfigNode node  )  [protected]

Definition at line 165 of file globalcontext.cpp.

References container::serverconfig::ConfigNode::getAttrs(), and m_queueDepth.

Referenced by registerParams().

Here is the call graph for this function:


Member Data Documentation

Definition at line 67 of file globalcontext.h.

Referenced by getApp(), and registerApp().

This variable holds number of threads processing task queue. Essentially - maximum number of simulteniously processed connections. Currently it is also used to initialize request queue depth

Definition at line 75 of file globalcontext.h.

Referenced by onPostComplete(), and setNumThreads().

sptk::CThreadPool* container::serverconfig::GlobalContext::m_pool [private]

Definition at line 85 of file globalcontext.h.

Referenced by onPostComplete(), and ~GlobalContext().

This variable holds maximum number of connections that can be held in queue for processing. Normally this should not be larger then number of threads.

Definition at line 82 of file globalcontext.h.

Referenced by onPostComplete(), and setQueueDepth().


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

SourceForge.net Logo