#include <ServletConfigImpl.h>
Public Member Functions | |
ServletConfigImpl (servlet::ServletContext *ctx, const std::string &name) | |
virtual | ~ServletConfigImpl () |
void | addParam (const std::string &name, const std::string &val) |
virtual std::string | getServletName () const |
virtual servlet::ServletContext & | getServletContext () const |
virtual std::string | getInitParameter (const std::string &name) const |
virtual std::auto_ptr < std::vector< std::string > > | getInitParameterNames () const |
Private Attributes | |
servlet::ServletContext * | m_ctx |
std::string | m_name |
util::param_t | m_parameters |
Definition at line 36 of file ServletConfigImpl.h.
container::ServletConfigImpl::ServletConfigImpl | ( | servlet::ServletContext * | ctx, | |
const std::string & | name | |||
) |
Definition at line 24 of file ServletConfigImpl.cpp.
container::ServletConfigImpl::~ServletConfigImpl | ( | ) | [virtual] |
Definition at line 32 of file ServletConfigImpl.cpp.
void container::ServletConfigImpl::addParam | ( | const std::string & | name, | |
const std::string & | val | |||
) |
Definition at line 39 of file ServletConfigImpl.cpp.
References m_parameters.
Referenced by container::serverconfig::ServletContext::onPostComplete().
std::string container::ServletConfigImpl::getInitParameter | ( | const std::string & | name | ) | const [virtual] |
Returns a String
containing the value of the named initialization parameter, or null
if the parameter does not exist.
name | a String specifying the name of the initialization parameter |
String
containing the value of the initialization parameter Implements servlet::ServletConfig.
Definition at line 52 of file ServletConfigImpl.cpp.
References m_parameters.
std::auto_ptr< std::vector< std::string > > container::ServletConfigImpl::getInitParameterNames | ( | ) | const [virtual] |
Returns the names of the servlet's initialization parameters as an Enumeration
of String
objects, or an empty Enumeration
if the servlet has no initialization parameters.
Enumeration
of String
objects containing the names of the servlet's initialization parameters Implements servlet::ServletConfig.
Definition at line 59 of file ServletConfigImpl.cpp.
References container::util::getMapKeyNames(), and m_parameters.
servlet::ServletContext & container::ServletConfigImpl::getServletContext | ( | ) | const [virtual] |
Returns a reference to the servlet::ServletContext in which the caller is executing.
Implements servlet::ServletConfig.
Definition at line 48 of file ServletConfigImpl.cpp.
References m_ctx.
Referenced by container::ServletContainer::forward(), and container::ServletContainer::service().
std::string container::ServletConfigImpl::getServletName | ( | ) | const [virtual] |
Returns the name of this servlet instance. The name may be provided via server administration, assigned in the web application deployment descriptor, or for an unregistered (and thus unnamed) servlet instance it will be the servlet's class name.
Implements servlet::ServletConfig.
Definition at line 44 of file ServletConfigImpl.cpp.
References m_name.
Referenced by container::ServletContainer::getName().
std::string container::ServletConfigImpl::m_name [private] |
Definition at line 40 of file ServletConfigImpl.h.
Referenced by addParam(), getInitParameter(), and getInitParameterNames().