Abstract base class that handles forwarding the configuration and T_ASC_Association to the actual worker class for each worker thread.
More...
|
static void | errorstr (OFString &description, int code) |
| converts any of the error codes returned by the methods of this class into a textual description, which is written into the string object. More...
|
|
static const int | busy |
| this constant is returned by the join() method if another thread is already waiting for termination of the thread referenced by the OFThread object. More...
|
|
static void | thread_exit () |
| terminates the calling thread, in a similar way that exit() terminates the calling process. More...
|
|
static unsigned long | self () |
| returns the thread ID of the calling thread. More...
|
|
Abstract base class that handles forwarding the configuration and T_ASC_Association to the actual worker class for each worker thread.
DcmBaseSCPPool::DcmBaseSCPWorker::DcmBaseSCPWorker |
( |
DcmBaseSCPPool & |
pool | ) |
|
|
protected |
Protected constructor which is called within the friend class DcmSCPWorkerFactory in order to create a worker.
- Parameters
-
pool | Handle to the SCP pool in order to inform pool about exiting the underlying thread, etc. |
virtual OFBool DcmBaseSCPPool::DcmBaseSCPWorker::busy |
( |
| ) |
|
|
pure virtual |
Check whether worker is busy.
- Returns
- OFTrue if worker is busy, OFFalse otherwise.
virtual void DcmBaseSCPPool::DcmBaseSCPWorker::exit |
( |
| ) |
|
|
virtual |
Ends and exits worker thread.
Call will not return.
virtual void DcmBaseSCPPool::DcmBaseSCPWorker::run |
( |
| ) |
|
|
protectedvirtual |
Set the association that should be handled by the worker thread.
This must happen before actually calling run() (i.e. start()) on the worker.
- Parameters
-
assoc | The association that should be handled by the worker. |
- Returns
- EC_Normal if OK, error code otherwise. An error may occur if the the function was called before with a valid association, or if the given association is NULL.
Set SCP configuration that should be used by the worker in order to handle incoming association requests (presentation contexts, etc.).
- Parameters
-
- Returns
- EC_Normal, if configuration is accepted, error code otherwise.
Starts listening on the given association.
Note that the underlying TCP connection must be already accepted, i.e. ASC_receiveAssociation() must have been called already on the association; after that, this listen() function kicks in and has to take over full responsibility of the association, including accepting it, refusing it, handling incoming DIMSE messages, freeing memory of the T_ASC_Association struct, and the like.
- Parameters
-
assoc | Pointer to the association that should be handled. Must not be NULL. |
- Returns
- EC_Normal if association was handled properly (i.e. was handled, refused, ... Only in case of connection or messaging errors, an error code will be returned instead.
Temporarily stores association parameter to be available for the run() method.
run() will set the pointer immediately to NULL; the deletion takes place inside the actual worker m_worker which starts its operation afterwards in run().
The documentation for this class was generated from the following file:
- dcmnet/include/dcmtk/dcmnet/scppool.h