PionNetworkLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pion::http::plugin_service Class Referenceabstract

#include <plugin_service.hpp>

Inheritance diagram for pion::http::plugin_service:
Collaboration diagram for pion::http::plugin_service:

Public Member Functions

 plugin_service (void)
 default constructor More...
 
virtual ~plugin_service ()
 virtual destructor More...
 
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 &)
 
virtual void start (void)
 called when the web service's server is starting More...
 
virtual void stop (void)
 called when the web service's server is stopping More...
 
void set_resource (const std::string &str)
 sets the URI stem or resource that is bound to the web service More...
 
const std::string & get_resource (void) const
 returns the URI stem or resource that is bound to the web service More...
 
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 More...
 

Detailed Description

plugin_service: interface class for web services

Constructor & Destructor Documentation

pion::http::plugin_service::plugin_service ( void  )
inline

default constructor

virtual pion::http::plugin_service::~plugin_service ( )
inlinevirtual

virtual destructor

Member Function Documentation

std::string pion::http::plugin_service::get_relative_resource ( const std::string &  resource_requested) const
inline

returns the path to the resource requested, relative to the web service's location

References get_resource(), and pion::algorithm::url_decode().

const std::string& pion::http::plugin_service::get_resource ( void  ) const
inline

returns the URI stem or resource that is bound to the web service

Referenced by get_relative_resource().

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
virtual void pion::http::plugin_service::set_option ( const std::string &  name,
const std::string &   
)
inlinevirtual

sets a configuration option

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

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

void pion::http::plugin_service::set_resource ( const std::string &  str)
inline

sets the URI stem or resource that is bound to the web service

Referenced by pion::http::plugin_server::add_service(), and pion::http::plugin_server::load_service().

virtual void pion::http::plugin_service::start ( void  )
inlinevirtual

called when the web service's server is starting

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

virtual void pion::http::plugin_service::stop ( void  )
inlinevirtual

called when the web service's server is stopping

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


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