KD SOAP API Documentation  2.1
Public Member Functions | List of all members
KDSoapThreadPool Class Reference

#include <KDSoapThreadPool.h>

Inheritance diagram for KDSoapThreadPool:
Inheritance graph
[legend]
Collaboration diagram for KDSoapThreadPool:
Collaboration graph
[legend]

Public Member Functions

 KDSoapThreadPool (QObject *parent=0)
 
 ~KDSoapThreadPool ()
 
void disconnectSockets (KDSoapServer *server)
 
int maxThreadCount () const
 
int numConnectedSockets (const KDSoapServer *server) const
 
void resetTotalConnectionCount (const KDSoapServer *server)
 
void setMaxThreadCount (int maxThreadCount)
 
int totalConnectionCount (const KDSoapServer *server) const
 

Detailed Description

Pool of threads that can be used to handle SOAP requests in a SOAP server. The thread pool is configured with a maximum number of threads.

In case the server application provides different services on different ports, it can decide to use the same thread pool for both services, in order to always respect the maximum number of threads globally.

Definition at line 26 of file KDSoapThreadPool.h.

Constructor & Destructor Documentation

◆ KDSoapThreadPool()

KDSoapThreadPool::KDSoapThreadPool ( QObject *  parent = 0)
explicit

Constructs a thread pool with the given parent.

Definition at line 29 of file KDSoapThreadPool.cpp.

◆ ~KDSoapThreadPool()

KDSoapThreadPool::~KDSoapThreadPool ( )

Destructs the thread pool, after ensuring that all threads finish properly.

Definition at line 35 of file KDSoapThreadPool.cpp.

Member Function Documentation

◆ disconnectSockets()

void KDSoapThreadPool::disconnectSockets ( KDSoapServer server)

Disconnect all connected sockets for a given server

Definition at line 117 of file KDSoapThreadPool.cpp.

◆ maxThreadCount()

int KDSoapThreadPool::maxThreadCount ( ) const

Returns the maximum number of threads used by the thread pool.

Definition at line 54 of file KDSoapThreadPool.cpp.

Referenced by setMaxThreadCount().

◆ numConnectedSockets()

int KDSoapThreadPool::numConnectedSockets ( const KDSoapServer server) const

Returns the number of connected sockets for a given server

Definition at line 108 of file KDSoapThreadPool.cpp.

◆ resetTotalConnectionCount()

void KDSoapThreadPool::resetTotalConnectionCount ( const KDSoapServer server)

Resets totalConnectionCount to 0.

Since
1.2

Definition at line 136 of file KDSoapThreadPool.cpp.

◆ setMaxThreadCount()

void KDSoapThreadPool::setMaxThreadCount ( int  maxThreadCount)

Sets the maximum number of threads used by the thread pool. Note: The thread pool will always use at least 1 thread, even if maxThreadCount limit is zero or negative. The default maxThreadCount is QThread::idealThreadCount().

Definition at line 49 of file KDSoapThreadPool.cpp.

References maxThreadCount().

◆ totalConnectionCount()

int KDSoapThreadPool::totalConnectionCount ( const KDSoapServer server) const

Returns the number of sockets that have connected to the given server, in this threadpool, since the last call to resetTotalConnectionCount().

Since
1.2

Definition at line 127 of file KDSoapThreadPool.cpp.


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

© 2010-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/
Generated on Tue Jun 13 2023 12:18:34 for KD SOAP API Documentation by doxygen 1.9.1