Poco::Net

class HTTPRequestHandlerFactory

File Information

Library: Net
Package: HTTPServer
Header: Poco/Net/HTTPRequestHandlerFactory.h

Description

A factory for HTTPRequestHandler objects. Subclasses must override the createRequestHandler() method.

Inheritance

Known Derived Classes: Poco::OSP::Web::WebServerRequestHandlerFactory, Poco::RemotingNG::HTTP::HTTPRequestHandlerFactory, Poco::RemotingNG::JSONRPC::JSONRPCRequestHandlerFactory, Poco::OSP::Web::WebRequestHandlerFactory, Poco::RemotingNG::REST::RESTRequestHandlerFactory

Member Summary

Member Functions: createRequestHandler

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < HTTPRequestHandlerFactory >;

Constructors

HTTPRequestHandlerFactory

HTTPRequestHandlerFactory();

Destructor

~HTTPRequestHandlerFactory virtual

virtual ~HTTPRequestHandlerFactory();

Member Functions

createRequestHandler virtual

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.

If the request contains a "Expect: 100-continue" header, it's possible to prevent the server from sending the default 100 Continue response by setting the status of the response object that can be obtained through the request object (request.response()) to something other than 200 OK.

Variables

serverStopped protected

Poco::BasicEvent < const bool > serverStopped;

Securely control IoT edge devices from anywhere   Connect a Device