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.
 
void setShutdown (bool shutdown=true)
 Set shutdown flag.
 
bool isIdle ()
 Returns true if not in use.
 
void detach ()
 Detach from server.
 
bool isMapped (const Request &request) const
 Returns true if request is mapped to the service.
 
Serviceservice ()
 Returns the service to map requests to.
 
Authorizerauthorizer ()
 Returns the authorizer.
 

Protected Member Functions

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