Wexus2 0.20
|
#include <HTTPHandlerStack.h>
Public Member Functions | |
HTTPHandlerStack (void) | |
constructor | |
virtual void | handleRequest (wexus::HTTPRequest &req, wexus::HTTPReply &reply) |
void | addHandler (std::shared_ptr< wexus::HTTPHandler > handler, int prio=50) |
A handler that maintains a list of other handlers. When it receives a request, it goes down this list of handlers until one of them processes the event.
void wexus::HTTPHandlerStack::addHandler | ( | std::shared_ptr< wexus::HTTPHandler > | handler, |
int | prio = 50 |
||
) |
Adds a handler to the end of the handler stack.
The stack is still sorted by priority, with lower priority handlers.
priorities should usually be between [1..99].
virtual void wexus::HTTPHandlerStack::handleRequest | ( | wexus::HTTPRequest & | req, |
wexus::HTTPReply & | reply | ||
) | [virtual] |
This is called when a request is to be processed.
req | the request |
Implements wexus::HTTPHandler.