class Poco::Net::HTTPRequestHandlerFactory

Overview

A factory for HTTPRequestHandler objects. Moreā€¦

#include <HTTPRequestHandlerFactory.h>

class HTTPRequestHandlerFactory
{
public:
    // typedefs

    typedef Poco::SharedPtr<HTTPRequestHandlerFactory> Ptr;

    // methods

    virtual
    HTTPRequestHandler*
    createRequestHandler(const HTTPServerRequest& request) = 0;

protected:
    // fields

    Poco::BasicEvent<const bool> serverStopped;
};

Detailed Documentation

A factory for HTTPRequestHandler objects.

Subclasses must override the createRequestHandler() method.

Construction

virtual
~HTTPRequestHandlerFactory()

Destroys the HTTPRequestHandlerFactory.

Methods

virtual
HTTPRequestHandler*
createRequestHandler(const HTTPServerRequest& request) = 0

Must be overridden by subclasses.

Creates a new request handler for the given HTTP request.

The method should inspect the given HTTPServerRequest object (e.g., method and URI) and create an appropriate HTTPRequestHandler object to handle the request.