mod_servlet
C++Servlets
 All Classes Files Functions Variables Typedefs Macros Pages
servlet::filter_config Class Referenceabstract

A filter configuration object used by a servlet container to pass information to a filter during initialization. More...

#include <context.h>

Public Member Functions

 filter_config (const std::string &filter_name)
 Creates new filter_config object with a given filter name. More...
 
 filter_config (std::string &&filter_name)
 Move version of the object constructor. More...
 
virtual ~filter_config () noexcept=default
 Destructor.
 
const std::string & get_filter_name () const
 Get the name of the filter. More...
 
virtual servlet_contextget_servlet_context ()=0
 Returns a reference to the servlet_context in which the caller is executing. More...
 
template<typename KeyType >
optional_ref< const std::string > get_init_parameter (const KeyType &key)
 Returns a std::string containing the value of the named initialization parameter, or empty_reference if the parameter does not exist. More...
 
const std::map< std::string,
std::string, std::less<> > & 
get_init_parameters ()
 Returns all the filter's initialization parameters as a tree_map. More...
 

Protected Attributes

const std::string _filter_name
 Filter name.
 

Detailed Description

A filter configuration object used by a servlet container to pass information to a filter during initialization.

See Also
http_filter

Constructor & Destructor Documentation

servlet::filter_config::filter_config ( const std::string &  filter_name)
inline

Creates new filter_config object with a given filter name.

Parameters
filter_nameThe name of the filter.
servlet::filter_config::filter_config ( std::string &&  filter_name)
inline

Move version of the object constructor.

Parameters
filter_namethe name of the filter
See Also
filter_config(const std::string &)

Member Function Documentation

const std::string& servlet::filter_config::get_filter_name ( ) const
inline

Get the name of the filter.

Returns
The filter-name of this filter as defined in the deployment descriptor.
template<typename KeyType >
optional_ref<const std::string> servlet::filter_config::get_init_parameter ( const KeyType &  key)
inline

Returns a std::string containing the value of the named initialization parameter, or empty_reference if the parameter does not exist.

Parameters
keya string specifying the name of the initialization parameter
Returns
a reference to a std::string containing the value of the initialization parameter
const std::map<std::string, std::string, std::less<> >& servlet::filter_config::get_init_parameters ( )
inline

Returns all the filter's initialization parameters as a tree_map.

Returns
a tree_map of all the filter's initialization parameters
virtual servlet_context& servlet::filter_config::get_servlet_context ( )
pure virtual

Returns a reference to the servlet_context in which the caller is executing.

Returns
servlet_context object, used by the caller to interact with its servlet container
See Also
servlet_context

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