Wexus2 0.20
wexus::HTTPHandlerStack Class Reference

#include <HTTPHandlerStack.h>

Inheritance diagram for wexus::HTTPHandlerStack:

List of all members.

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)

Detailed Description

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.

Author:
Aleksander Demko

Member Function Documentation

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].

Author:
Aleksander Demko
virtual void wexus::HTTPHandlerStack::handleRequest ( wexus::HTTPRequest req,
wexus::HTTPReply reply 
) [virtual]

This is called when a request is to be processed.

Parameters:
reqthe request
Returns:
true if this consumer has processed this even and no further consumers should receive this event. false if this consumer does not want to process this event.
Author:
Aleksander Demko

Implements wexus::HTTPHandler.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator