KD SOAP
1.10.0
|
#include <KDSoapThreadPool.h>
Inherits QObject.
Public Member Functions | |
KDSoapThreadPool (QObject *parent=0) | |
~KDSoapThreadPool () | |
void | setMaxThreadCount (int maxThreadCount) |
int | maxThreadCount () const |
int | numConnectedSockets (const KDSoapServer *server) const |
int | totalConnectionCount (const KDSoapServer *server) const |
void | resetTotalConnectionCount (const KDSoapServer *server) |
void | disconnectSockets (KDSoapServer *server) |
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.
|
explicit |
Constructs a thread pool with the given parent
.
KDSoapThreadPool::~KDSoapThreadPool | ( | ) |
Destructs the thread pool, after ensuring that all threads finish properly.
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().
int KDSoapThreadPool::maxThreadCount | ( | ) | const |
Returns the maximum number of threads used by the thread pool.
int KDSoapThreadPool::numConnectedSockets | ( | const KDSoapServer * | server | ) | const |
Returns the number of connected sockets for a given server
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().
void KDSoapThreadPool::resetTotalConnectionCount | ( | const KDSoapServer * | server | ) |
Resets totalConnectionCount to 0.
void KDSoapThreadPool::disconnectSockets | ( | KDSoapServer * | server | ) |
Disconnect all connected sockets for a given server