Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::service::http::HttpService Class Reference

HTTP v3 Service Interface. More...

#include <HttpService.h>

Inheritance diagram for sese::service::http::HttpService:
sese::service::Service sese::internal::service::http::HttpServiceImpl

Public Types

using Ptr = std::shared_ptr<HttpService>
 
using SSLContextPtr = std::unique_ptr<security::SSLContext>
 
using FilterCallback = std::function<bool(net::http::Request &, net::http::Response &)>
 
using ConnectionCallback = std::function<bool(net::IPAddress::Ptr &)>
 
using FilterMap = std::unordered_map<std::string, FilterCallback>
 
using MountPointMap = std::unordered_map<std::string, std::string>
 
using ServletMap = std::unordered_map<std::string, net::http::Servlet>
 
- Public Types inherited from sese::service::Service
using Ptr = std::unique_ptr<Service>
 

Static Public Member Functions

static HttpService::Ptr create (const net::IPAddress::Ptr &address, SSLContextPtr ssl_context, uint32_t keepalive, std::string &serv_name, MountPointMap &mount_points, ServletMap &servlets, FilterCallback &tail_filter, FilterMap &filters, ConnectionCallback &connection_callback)
 

Protected Member Functions

 HttpService (net::IPAddress::Ptr address, SSLContextPtr ssl_context, uint32_t keepalive, std::string &serv_name, MountPointMap &mount_points, ServletMap &servlets, FilterCallback &tail_filter, FilterMap &filters, ConnectionCallback &connection_callback)
 

Protected Attributes

net::IPAddress::Ptr address
 
SSLContextPtr ssl_context
 
Thread::Ptr thread
 
uint32_t keepalive = 30
 
std::string & serv_name
 
MountPointMapmount_points
 
ServletMapservlets
 
FilterCallbacktail_filter
 
FilterMapfilters
 
ConnectionCallbackconnection_callback
 

Additional Inherited Members

- Public Member Functions inherited from sese::service::Service
 Service ()=default
 
virtual ~Service ()=default
 
virtual bool startup ()=0
 
virtual bool shutdown ()=0
 
virtual int getLastError ()=0
 
virtual std::string getLastErrorMessage ()=0
 
ErrorCode getErrorCode ()
 

Detailed Description

HTTP v3 Service Interface.

Member Typedef Documentation

◆ ConnectionCallback

◆ FilterCallback

◆ FilterMap

using sese::service::http::HttpService::FilterMap = std::unordered_map<std::string, FilterCallback>

◆ MountPointMap

using sese::service::http::HttpService::MountPointMap = std::unordered_map<std::string, std::string>

◆ Ptr

◆ ServletMap

using sese::service::http::HttpService::ServletMap = std::unordered_map<std::string, net::http::Servlet>

◆ SSLContextPtr

Constructor & Destructor Documentation

◆ HttpService()

sese::service::http::HttpService::HttpService ( net::IPAddress::Ptr address,
SSLContextPtr ssl_context,
uint32_t keepalive,
std::string & serv_name,
MountPointMap & mount_points,
ServletMap & servlets,
FilterCallback & tail_filter,
FilterMap & filters,
ConnectionCallback & connection_callback )
protected

Member Function Documentation

◆ create()

sese::service::http::HttpService::Ptr sese::service::http::HttpService::create ( const net::IPAddress::Ptr & address,
SSLContextPtr ssl_context,
uint32_t keepalive,
std::string & serv_name,
MountPointMap & mount_points,
ServletMap & servlets,
FilterCallback & tail_filter,
FilterMap & filters,
ConnectionCallback & connection_callback )
static

Member Data Documentation

◆ address

net::IPAddress::Ptr sese::service::http::HttpService::address
protected

Referenced by create().

◆ connection_callback

ConnectionCallback& sese::service::http::HttpService::connection_callback
protected

Referenced by create().

◆ filters

FilterMap& sese::service::http::HttpService::filters
protected

Referenced by create().

◆ keepalive

uint32_t sese::service::http::HttpService::keepalive = 30
protected

◆ mount_points

MountPointMap& sese::service::http::HttpService::mount_points
protected

Referenced by create().

◆ serv_name

std::string& sese::service::http::HttpService::serv_name
protected

Referenced by create().

◆ servlets

ServletMap& sese::service::http::HttpService::servlets
protected

Referenced by create().

◆ ssl_context

SSLContextPtr sese::service::http::HttpService::ssl_context
protected

Referenced by create().

◆ tail_filter

FilterCallback& sese::service::http::HttpService::tail_filter
protected

Referenced by create().

◆ thread

Thread::Ptr sese::service::http::HttpService::thread
protected

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