Public Types | Public Member Functions | Private Attributes
async_web_server_cpp::HttpRequestHandlerGroup Class Reference

#include <http_request_handler.hpp>

List of all members.

Public Types

typedef boost::function< bool(const
HttpRequest &)> 
HandlerPredicate

Public Member Functions

void addHandler (HandlerPredicate predicate, HttpServerRequestHandler handler)
void addHandlerForPath (const std::string &path_regex, HttpServerRequestHandler handler)
 HttpRequestHandlerGroup (HttpServerRequestHandler default_handler)
void operator() (const HttpRequest &request, boost::shared_ptr< HttpConnection > connection, const char *begin, const char *end)

Private Attributes

HttpServerRequestHandler default_handler_
std::vector< std::pair
< HandlerPredicate,
HttpServerRequestHandler > > 
handlers_

Detailed Description

A hander that can dispatch to a request to different handlers depending on a predicate. If none of registered handlers satisfy the request then the default request handler is used.

Definition at line 20 of file http_request_handler.hpp.


Member Typedef Documentation

Definition at line 23 of file http_request_handler.hpp.


Constructor & Destructor Documentation

Definition at line 7 of file http_request_handler.cpp.


Member Function Documentation

Definition at line 34 of file http_request_handler.cpp.

Definition at line 29 of file http_request_handler.cpp.

void async_web_server_cpp::HttpRequestHandlerGroup::operator() ( const HttpRequest request,
boost::shared_ptr< HttpConnection connection,
const char *  begin,
const char *  end 
)

Definition at line 40 of file http_request_handler.cpp.


Member Data Documentation

Definition at line 34 of file http_request_handler.hpp.

Definition at line 35 of file http_request_handler.hpp.


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


async_web_server_cpp
Author(s): Mitchell Wills
autogenerated on Thu Aug 27 2015 12:27:39