pion  5.0.6
Public Member Functions | List of all members
pion::http::plugin_service Class Referenceabstract

#include <plugin_service.hpp>

Inherits noncopyable.

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

Public Member Functions

 plugin_service (void)
 default constructor
 
virtual ~plugin_service ()
 virtual destructor
 
virtual void operator() (const http::request_ptr &http_request_ptr, const tcp::connection_ptr &tcp_conn)=0
 
virtual void set_option (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 set_resource (const std::string &str)
 sets the URI stem or resource that is bound to the web service
 
const std::string & get_resource (void) const
 returns the URI stem or resource that is bound to the web service
 
std::string get_relative_resource (const std::string &resource_requested) const
 returns the path to the resource requested, relative to the web service's location
 

Detailed Description

plugin_service: interface class for web services

Definition at line 29 of file plugin_service.hpp.

Member Function Documentation

§ operator()()

virtual void pion::http::plugin_service::operator() ( const http::request_ptr &  http_request_ptr,
const tcp::connection_ptr &  tcp_conn 
)
pure virtual

attempts to handle a new HTTP request

Parameters
http_request_ptrthe 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.

Referenced by ~plugin_service().

§ set_option()

virtual void pion::http::plugin_service::set_option ( const std::string &  name,
const std::string &  value 
)
inlinevirtual

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 54 of file plugin_service.hpp.

Referenced by pion::http::plugin_server::set_service_option().


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