CFEL - ASG Software Suite
2.5.0
CASS
|
SOAP server. More...
#include <tcpserver.h>
Public Types | |
typedef std::tr1::shared_ptr< SoapServer > | shared_pointer |
a shared pointer of this class More... | |
Public Member Functions | |
~SoapServer () | |
Destructor. More... | |
![]() | |
QThread (QObject *parent=0) | |
currentThread () | |
HANDLE QThread::currentThreadId() | |
exec () | |
exit (int returnCode=0) | |
finished () | |
idealThreadCount () | |
isFinished () | |
isRunning () | |
msleep (unsigned long msecs) | |
priority () | |
quit () | |
run () | |
setPriority (Priority priority) | |
setStackSize (uint stackSize) | |
setTerminationEnabled (bool enabled=true) | |
sleep (unsigned long secs) | |
stackSize () | |
start (Priority priority=InheritPriority) | |
started () | |
terminate () | |
terminated () | |
usleep (unsigned long usecs) | |
wait (unsigned long time=ULONG_MAX) | |
yieldCurrentThread () | |
Static Public Member Functions | |
static shared_pointer | instance (size_t port=12321) |
create the instance if not it does not exist already More... | |
Protected Member Functions | |
virtual void | run () |
perform thread-work More... | |
Static Protected Member Functions | |
static shared_pointer | instance () |
return existing instance for our friends More... | |
Protected Attributes | |
CASSsoapService * | _soap |
the service More... | |
const size_t | _port |
server port More... | |
Static Protected Attributes | |
static const size_t | _backlog |
maximum backlog of open requests More... | |
Private Member Functions | |
SoapServer (size_t port, QObject *parent=0) | |
Constructor. More... | |
SoapServer () | |
Disabled default constructor. More... | |
SoapServer (const SoapServer &) | |
Disabled copy constructor. More... | |
SoapServer & | operator= (const SoapServer &) |
Disabled assignment. More... | |
Static Private Attributes | |
static shared_pointer | _instance |
pointer to the singleton instance More... | |
static QMutex | _mutex |
Singleton operation locker. More... | |
Friends | |
class | ::CASSsoapService |
be friend with the soap instances More... | |
SOAP server.
Definition at line 64 of file tcpserver.h.
typedef std::tr1::shared_ptr<SoapServer> cass::SoapServer::shared_pointer |
a shared pointer of this class
Definition at line 71 of file tcpserver.h.
|
private |
Constructor.
sets up the initial values
port | The port that the soap will run on |
parent | The Qt parent object that this class belong to |
Definition at line 61 of file tcpserver.cpp.
References _port, cass::Log::add(), cass::Log::INFO, and cass::toString().
|
private |
Disabled default constructor.
|
private |
Disabled copy constructor.
SoapServer::~SoapServer | ( | ) |
Destructor.
Check whether thread is still running. If so terminate it and wait until it finished. Then clean up SOAP by destroying and deleting the soap instance.
Definition at line 69 of file tcpserver.cpp.
References _soap, QThread::isRunning(), QThread::terminate(), and QThread::wait().
|
static |
create the instance if not it does not exist already
port | The port that the soap instance is running on. Default is 12321 |
Definition at line 44 of file tcpserver.cpp.
|
inlinestaticprotected |
return existing instance for our friends
if it doesn't exist, throw exception
Definition at line 96 of file tcpserver.h.
|
private |
Disabled assignment.
|
protectedvirtual |
perform thread-work
Sets up and connects to the soap service then waits until the soap service get an information. Copies the soap instance and create an new handler to serve the soap request.
The handler is put into a QThreadPool which will automatically destroy it once one is done serving.
Definition at line 78 of file tcpserver.cpp.
References _backlog, _port, _soap, cass::Log::add(), cass::Log::ERROR, QThreadPool::globalInstance(), and cass::toString().
|
friend |
be friend with the soap instances
Definition at line 67 of file tcpserver.h.
|
staticprotected |
|
staticprivate |
pointer to the singleton instance
Definition at line 143 of file tcpserver.h.
Referenced by instance().
|
staticprivate |
|
protected |
|
protected |