QxOrm 1.4.9
C++ Object Relational Mapping library
Loading...
Searching...
No Matches

qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96 More...

#include <QxHttpServer.h>

Inheritance diagram for qx::QxHttpServer:

Public Types

typedef std::function< void(qx::QxHttpRequest &, qx::QxHttpResponse &)> type_fct_custom_request_handler
 

Signals

void error (const QString &err, qx::QxHttpTransaction_ptr transaction)
 
void transactionStarted (qx::QxHttpTransaction_ptr transaction)
 
void transactionFinished (qx::QxHttpTransaction_ptr transaction)
 
void serverStatusChanged (bool bIsRunning)
 

Public Member Functions

 QxHttpServer (QObject *parent=NULL)
 
virtual ~QxHttpServer ()
 
Q_INVOKABLE void startServer ()
 
Q_INVOKABLE void stopServer ()
 
void setCustomRequestHandler (type_fct_custom_request_handler fct)
 
QxHttpServerdispatch (const QString &command, const QString &path, type_fct_custom_request_handler fct, long position=-1)
 
void beforeDispatching (type_fct_custom_request_handler fct)
 
void afterDispatching (type_fct_custom_request_handler fct)
 
void clearDispatcher ()
 
void setEventDispatcher (QAbstractEventDispatcher *pEventDispatcher)
 

Static Public Member Functions

static void buildResponseStaticFile (qx::QxHttpRequest &request, qx::QxHttpResponse &response, const QString &serverPath, qlonglong chunkedSize=0)
 
static void buildResponseQxRestApi (qx::QxHttpRequest &request, qx::QxHttpResponse &response)
 

Private Slots

void onError (const QString &err, qx::service::QxTransaction_ptr transaction)
 
void onServerIsRunning (bool bIsRunning, qx::service::QxServer *pServer)
 
void onTransactionStarted (qx::service::QxTransaction_ptr transaction)
 
void onTransactionFinished (qx::service::QxTransaction_ptr transaction)
 
void onCustomRequestHandler (qx::service::QxTransaction_ptr transaction)
 

Private Attributes

std::unique_ptr< QxHttpServerImpl > m_pImpl
 Private implementation idiom.
 

Detailed Description

qx::QxHttpServer : HTTP server which manages connections in a multi-threaded environment (support SSL/TLS, persistent connection, etc...) : https://www.qxorm.com/qxorm_en/manual.html#manual_96

Definition at line 77 of file QxHttpServer.h.

Member Typedef Documentation

◆ type_fct_custom_request_handler

Definition at line 84 of file QxHttpServer.h.

Constructor & Destructor Documentation

◆ QxHttpServer()

qx::QxHttpServer::QxHttpServer ( QObject * parent = NULL)

◆ ~QxHttpServer()

virtual qx::QxHttpServer::~QxHttpServer ( )
virtual

Member Function Documentation

◆ afterDispatching()

void qx::QxHttpServer::afterDispatching ( type_fct_custom_request_handler fct)

◆ beforeDispatching()

void qx::QxHttpServer::beforeDispatching ( type_fct_custom_request_handler fct)

◆ buildResponseQxRestApi()

static void qx::QxHttpServer::buildResponseQxRestApi ( qx::QxHttpRequest & request,
qx::QxHttpResponse & response )
static

◆ buildResponseStaticFile()

static void qx::QxHttpServer::buildResponseStaticFile ( qx::QxHttpRequest & request,
qx::QxHttpResponse & response,
const QString & serverPath,
qlonglong chunkedSize = 0 )
static

◆ clearDispatcher()

void qx::QxHttpServer::clearDispatcher ( )

◆ dispatch()

QxHttpServer & qx::QxHttpServer::dispatch ( const QString & command,
const QString & path,
type_fct_custom_request_handler fct,
long position = -1 )

◆ error

void qx::QxHttpServer::error ( const QString & err,
qx::QxHttpTransaction_ptr transaction )
signal

◆ onCustomRequestHandler

void qx::QxHttpServer::onCustomRequestHandler ( qx::service::QxTransaction_ptr transaction)
privateslot

◆ onError

void qx::QxHttpServer::onError ( const QString & err,
qx::service::QxTransaction_ptr transaction )
privateslot

◆ onServerIsRunning

void qx::QxHttpServer::onServerIsRunning ( bool bIsRunning,
qx::service::QxServer * pServer )
privateslot

◆ onTransactionFinished

void qx::QxHttpServer::onTransactionFinished ( qx::service::QxTransaction_ptr transaction)
privateslot

◆ onTransactionStarted

void qx::QxHttpServer::onTransactionStarted ( qx::service::QxTransaction_ptr transaction)
privateslot

◆ serverStatusChanged

void qx::QxHttpServer::serverStatusChanged ( bool bIsRunning)
signal

◆ setCustomRequestHandler()

void qx::QxHttpServer::setCustomRequestHandler ( type_fct_custom_request_handler fct)

◆ setEventDispatcher()

void qx::QxHttpServer::setEventDispatcher ( QAbstractEventDispatcher * pEventDispatcher)

◆ startServer()

Q_INVOKABLE void qx::QxHttpServer::startServer ( )

◆ stopServer()

Q_INVOKABLE void qx::QxHttpServer::stopServer ( )

◆ transactionFinished

void qx::QxHttpServer::transactionFinished ( qx::QxHttpTransaction_ptr transaction)
signal

◆ transactionStarted

void qx::QxHttpServer::transactionStarted ( qx::QxHttpTransaction_ptr transaction)
signal

Member Data Documentation

◆ m_pImpl

std::unique_ptr<QxHttpServerImpl> qx::QxHttpServer::m_pImpl
private

Private implementation idiom.

Definition at line 89 of file QxHttpServer.h.


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