CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Attributes | Friends | List of all members
cass::SoapServer Class Reference

SOAP server. More...

#include <tcpserver.h>

+ Inheritance diagram for cass::SoapServer:
+ Collaboration diagram for cass::SoapServer:

Public Types

typedef std::tr1::shared_ptr< SoapServershared_pointer
 a shared pointer of this class More...
 

Public Member Functions

 ~SoapServer ()
 Destructor. More...
 
- Public Member Functions inherited from QThread
 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...
 
SoapServeroperator= (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...
 

Detailed Description

SOAP server.

Author
Jochen Küpper

Definition at line 64 of file tcpserver.h.

Member Typedef Documentation

typedef std::tr1::shared_ptr<SoapServer> cass::SoapServer::shared_pointer

a shared pointer of this class

Definition at line 71 of file tcpserver.h.

Constructor & Destructor Documentation

SoapServer::SoapServer ( size_t  port,
QObject parent = 0 
)
private

Constructor.

sets up the initial values

Parameters
portThe port that the soap will run on
parentThe 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().

cass::SoapServer::SoapServer ( )
private

Disabled default constructor.

cass::SoapServer::SoapServer ( const SoapServer )
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().

Member Function Documentation

SoapServer::shared_pointer SoapServer::instance ( size_t  port = 12321)
static

create the instance if not it does not exist already

Returns
the instance to this server
Parameters
portThe port that the soap instance is running on. Default is 12321

Definition at line 44 of file tcpserver.cpp.

static shared_pointer cass::SoapServer::instance ( )
inlinestaticprotected

return existing instance for our friends

if it doesn't exist, throw exception

Definition at line 96 of file tcpserver.h.

References _instance, and _mutex.

SoapServer& cass::SoapServer::operator= ( const SoapServer )
private

Disabled assignment.

void SoapServer::run ( )
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().

Friends And Related Function Documentation

friend class ::CASSsoapService
friend

be friend with the soap instances

Definition at line 67 of file tcpserver.h.

Member Data Documentation

const size_t SoapServer::_backlog
staticprotected

maximum backlog of open requests

Definition at line 108 of file tcpserver.h.

Referenced by run().

SoapServer::shared_pointer SoapServer::_instance
staticprivate

pointer to the singleton instance

Definition at line 143 of file tcpserver.h.

Referenced by instance().

QMutex SoapServer::_mutex
staticprivate

Singleton operation locker.

Definition at line 146 of file tcpserver.h.

Referenced by instance().

const size_t cass::SoapServer::_port
protected

server port

Definition at line 111 of file tcpserver.h.

Referenced by run(), and SoapServer().

CASSsoapService* cass::SoapServer::_soap
protected

the service

Definition at line 105 of file tcpserver.h.

Referenced by run(), and ~SoapServer().


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