MapUrl Class Reference

#include <Pt/Http/Servlet.h>

Maps requests to a service by URL.

Inherits Servlet.

Public Member Functions

 MapUrl (const std::string &url, Service &s)
 Construct with url to map to a service.
 MapUrl (const std::string &url, Service &s, Authorizer &a)
 Construct with url to map to a service.
Authorizerauthorizer ()
 Returns the authorizer.
void detach ()
 Detach from server.
bool isIdle ()
 Returns true if not in use.
bool isMapped (const Request &request) const
 Returns true if request is mapped to the service.
Serviceservice ()
 Returns the service to map requests to.
void setShutdown (bool shutdown=true)
 Set shutdown flag.

Protected Member Functions

bool onRequest (const Request &request) const
 Returns true if the servlet should process the request.