ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::AbstractRoute Class Referenceabstract

Defines an abstract HTTP server route. More...

#include <AbstractServerTypes.h>

Inheritance diagram for ofx::HTTP::AbstractRoute:
ofx::HTTP::AbstractHTTPRequestHandler ofx::HTTP::AbstractHTTPRequestHandlerFactory ofx::HTTP::AbstractServerEventRequestHandler ofx::HTTP::BaseRoute_< BaseRouteSettings > ofx::HTTP::BaseRoute_< FileSystemRouteSettings > ofx::HTTP::BaseRoute_< IPVideoRouteSettings > ofx::HTTP::BaseRoute_< PostRouteSettings > ofx::HTTP::BaseRoute_< SSERouteSettings > ofx::HTTP::BaseRoute_< WebSocketRouteSettings > ofx::HTTP::BaseRoute_< SettingsType > ofx::HTTP::FileSystemRoute ofx::HTTP::IPVideoRoute ofx::HTTP::PostRoute ofx::HTTP::SSERoute ofx::HTTP::WebSocketRoute

Public Member Functions

virtual ~AbstractRoute ()
 Destroy the AbstractRoute instance.
 
virtual std::string routePathPattern () const =0
 Get the route's regex path pattern. More...
 
virtual bool canHandleRequest (const Poco::Net::HTTPServerRequest &request, bool isSecurePort) const =0
 Determine if this route can handle the given request. More...
 
virtual void stop ()=0
 Stop any pending activity and close this route. More...
 
virtual AbstractServergetServer ()=0
 Get a pointer to the server. More...
 
virtual void setServer (AbstractServer *server)=0
 Set the parent server. More...
 
- Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandler
virtual ~AbstractHTTPRequestHandler ()
 Destroy the AbstractHTTPRequestHandler.
 
- Public Member Functions inherited from ofx::HTTP::AbstractServerEventRequestHandler
virtual ~AbstractServerEventRequestHandler ()
 Destroy the AbstractServerEventRequestHandler.
 
virtual void handleRequest (ServerEventArgs &evt)=0
 Handle the ServerEventArgs. More...
 
- Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandlerFactory
virtual ~AbstractHTTPRequestHandlerFactory ()
 Destroy the AbstractHTTPRequestHandlerFactory.
 
virtual Poco::Net::HTTPRequestHandler * createRequestHandler (const Poco::Net::HTTPServerRequest &request)=0
 Creates a new HTTPRequestHandler for the given request. More...
 

Detailed Description

Defines an abstract HTTP server route.

Member Function Documentation

◆ canHandleRequest()

virtual bool ofx::HTTP::AbstractRoute::canHandleRequest ( const Poco::Net::HTTPServerRequest &  request,
bool  isSecurePort 
) const
pure virtual

Determine if this route can handle the given request.

Parameters
requestThe incoming Poco::Net::HTTPServerRequest to be tested.
isSecurePorttrue iff the connection is SSL encrypted. Some implmenetations of this interface may choose to only handle requests on secure ports.
Returns
true iff the route can handle the given request.

Implemented in ofx::HTTP::WebSocketRoute, ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, ofx::HTTP::BaseRoute_< IPVideoRouteSettings >, and ofx::HTTP::SSERoute.

◆ getServer()

◆ routePathPattern()

virtual std::string ofx::HTTP::AbstractRoute::routePathPattern ( ) const
pure virtual

Get the route's regex path pattern.

The path pattern is used to match incoming server requests and allows requests to be routed to different routes based on their requested URI.

Returns
the regex path pattern.

Implemented in ofx::HTTP::BaseRoute_< SettingsType >, ofx::HTTP::BaseRoute_< SSERouteSettings >, ofx::HTTP::BaseRoute_< PostRouteSettings >, ofx::HTTP::BaseRoute_< FileSystemRouteSettings >, ofx::HTTP::BaseRoute_< WebSocketRouteSettings >, ofx::HTTP::BaseRoute_< BaseRouteSettings >, and ofx::HTTP::BaseRoute_< IPVideoRouteSettings >.

◆ setServer()

◆ stop()


The documentation for this class was generated from the following file: