![]() |
KD SOAP API Documentation
2.2
|
#include <KDSoapThreadPool.h>
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 |
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.
|
explicit |
Constructs a thread pool with the given parent
.
Definition at line 29 of file KDSoapThreadPool.cpp.
KDSoapThreadPool::~KDSoapThreadPool | ( | ) |
Destructs the thread pool, after ensuring that all threads finish properly.
Definition at line 35 of file KDSoapThreadPool.cpp.
void KDSoapThreadPool::disconnectSockets | ( | KDSoapServer * | server | ) |
Disconnect all connected sockets for a given server
Definition at line 117 of file KDSoapThreadPool.cpp.
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().
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.
void KDSoapThreadPool::resetTotalConnectionCount | ( | const KDSoapServer * | server | ) |
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().
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().
Definition at line 127 of file KDSoapThreadPool.cpp.