pion-net  4.0.9
Classes | Public Member Functions
pion::net::WebService Class Reference

#include <WebService.hpp>

Inherits noncopyable.

Inherited by pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.

List of all members.

Classes

class  UnknownOptionException
 exception thrown if the service does not recognize a configuration option More...

Public Member Functions

 WebService (void)
 default constructor
virtual ~WebService ()
 virtual destructor
virtual void operator() (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0
virtual void setOption (const std::string &name, const std::string &value)
virtual void start (void)
 called when the web service's server is starting
virtual void stop (void)
 called when the web service's server is stopping
void setResource (const std::string &str)
 sets the URI stem or resource that is bound to the web service
const std::string & getResource (void) const
 returns the URI stem or resource that is bound to the web service
std::string getRelativeResource (const std::string &resource_requested) const
 returns the path to the resource requested, relative to the web service's location

Detailed Description

WebService: interface class for web services

Definition at line 28 of file WebService.hpp.


Member Function Documentation

virtual void pion::net::WebService::operator() ( HTTPRequestPtr &  request,
TCPConnectionPtr &  tcp_conn 
) [pure virtual]

attempts to handle a new HTTP request

Parameters:
requestthe new HTTP request to handle
tcp_connthe TCP connection that has the new request

Implemented in pion::plugins::FileService, pion::plugins::LogService, pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, and pion::plugins::HelloService.

virtual void pion::net::WebService::setOption ( const std::string &  name,
const std::string &  value 
) [inline, virtual]

sets a configuration option

Parameters:
namethe name of the option to change
valuethe value of the option

Reimplemented in pion::plugins::FileService.

Definition at line 60 of file WebService.hpp.

Referenced by pion::net::WebServer::setServiceOption().


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