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)
bool 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 26 of file http_request_handler.hpp.


Member Typedef Documentation

Definition at line 29 of file http_request_handler.hpp.


Constructor & Destructor Documentation

Definition at line 13 of file http_request_handler.cpp.


Member Function Documentation

Definition at line 40 of file http_request_handler.cpp.

Definition at line 35 of file http_request_handler.cpp.

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

Definition at line 46 of file http_request_handler.cpp.


Member Data Documentation

Definition at line 40 of file http_request_handler.hpp.

Definition at line 41 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 Fri Mar 4 2016 11:30:14