Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4TaskHandlerRunnable Class Reference

This is the abstract interface for all runnables associated with the taskhandler class @stereotype interface. More...

#include <TGo4TaskHandlerRunnable.h>

Inheritance diagram for TGo4TaskHandlerRunnable:

TGo4Runnable TGo4CommandRunnable TGo4DataRunnable TGo4StatusRunnable List of all members.

Public Methods

 TGo4TaskHandlerRunnable (const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE)
virtual ~TGo4TaskHandlerRunnable ()
virtual Int_t Run (void *ptr)=0
 The working function which runs in the thread. More...

TGo4TaskHandlerGetTaskHandler ()

Protected Methods

Bool_t CheckStopBuffer (TBuffer *buf, Int_t *result=0)
 Test if buffer contains a message to stop this runnable. More...

Bool_t CheckTransportOpen ()
 Test if socket transport exists and is open. More...


Protected Attributes

TGo4SocketfxTransport
 link to external inter-tasl transport channel. More...

TGo4TaskHandlerfxTaskHandler
 link to external task handler (for server mode) @supplierCardinality 1 @clientCardinality 1. More...

Bool_t fbReceiverMode
 flag indicating operation mode of runnable, depending on client or server mode of task handler. More...

TGo4BufferQueuefxBufferQueue
 Link to external buffer queue. More...


Private Methods

 TGo4TaskHandlerRunnable ()

Detailed Description

This is the abstract interface for all runnables associated with the taskhandler class @stereotype interface.

Definition at line 34 of file TGo4TaskHandlerRunnable.h.


Constructor & Destructor Documentation

TGo4TaskHandlerRunnable::TGo4TaskHandlerRunnable const char *    name,
TGo4ThreadManager   man,
TGo4TaskHandler   hand,
Bool_t    receivermode = kTRUE
 

Definition at line 28 of file TGo4TaskHandlerRunnable.cxx.

References fbReceiverMode, and fxTaskHandler.

TGo4TaskHandlerRunnable::~TGo4TaskHandlerRunnable   [virtual]
 

Definition at line 35 of file TGo4TaskHandlerRunnable.cxx.

TGo4TaskHandlerRunnable::TGo4TaskHandlerRunnable   [private]
 


Member Function Documentation

virtual Int_t TGo4TaskHandlerRunnable::Run void *    ptr [pure virtual]
 

The working function which runs in the thread.

Implements TGo4Runnable.

Implemented in TGo4CommandRunnable, TGo4DataRunnable, and TGo4StatusRunnable.

TGo4TaskHandler * TGo4TaskHandlerRunnable::GetTaskHandler  
 

Definition at line 39 of file TGo4TaskHandlerRunnable.cxx.

References fxTaskHandler.

Referenced by TGo4TaskHandlerException::TGo4TaskHandlerException().

Bool_t TGo4TaskHandlerRunnable::CheckStopBuffer TBuffer *    buf,
Int_t *    result = 0
[protected]
 

Test if buffer contains a message to stop this runnable.

This mechanism is used to properly put taskhandler threads into parking position when connection is discarded. Value of buffer is set to external variable result optionally.

Definition at line 44 of file TGo4TaskHandlerRunnable.cxx.

References TGo4BufferQueue::DecodeValueBuffer(), TGo4Runnable::GetThread(), Go4EmergencyCommand_t, kComCloseInput, and TGo4Thread::Stop().

Referenced by TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), and TGo4CommandRunnable::Run().

Bool_t TGo4TaskHandlerRunnable::CheckTransportOpen   [protected]
 

Test if socket transport exists and is open.

If not open, sleep a while to avoid deadlooping of Run()

Definition at line 64 of file TGo4TaskHandlerRunnable.cxx.

References TGo4TaskHandler::fguPORTWAITTIME, fxTransport, TGo4Socket::IsOpen(), and TGo4Thread::Sleep().

Referenced by TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), and TGo4CommandRunnable::Run().


Member Data Documentation

TGo4Socket* TGo4TaskHandlerRunnable::fxTransport [protected]
 

link to external inter-tasl transport channel.

Definition at line 70 of file TGo4TaskHandlerRunnable.h.

Referenced by CheckTransportOpen(), TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), TGo4CommandRunnable::Run(), TGo4CommandRunnable::TGo4CommandRunnable(), TGo4DataRunnable::TGo4DataRunnable(), and TGo4StatusRunnable::TGo4StatusRunnable().

TGo4TaskHandler* TGo4TaskHandlerRunnable::fxTaskHandler [protected]
 

link to external task handler (for server mode) @supplierCardinality 1 @clientCardinality 1.

Definition at line 77 of file TGo4TaskHandlerRunnable.h.

Referenced by GetTaskHandler(), TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), TGo4CommandRunnable::Run(), TGo4CommandRunnable::TGo4CommandRunnable(), TGo4DataRunnable::TGo4DataRunnable(), TGo4StatusRunnable::TGo4StatusRunnable(), and TGo4TaskHandlerRunnable().

Bool_t TGo4TaskHandlerRunnable::fbReceiverMode [protected]
 

flag indicating operation mode of runnable, depending on client or server mode of task handler.

Definition at line 83 of file TGo4TaskHandlerRunnable.h.

Referenced by TGo4TaskHandlerRunnable().

TGo4BufferQueue* TGo4TaskHandlerRunnable::fxBufferQueue [protected]
 

Link to external buffer queue.

For object sending mode.

Definition at line 89 of file TGo4TaskHandlerRunnable.h.

Referenced by TGo4StatusRunnable::Run(), TGo4DataRunnable::Run(), TGo4CommandRunnable::Run(), TGo4CommandRunnable::TGo4CommandRunnable(), TGo4DataRunnable::TGo4DataRunnable(), and TGo4StatusRunnable::TGo4StatusRunnable().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:56 2005 for Go4-v2.10-5 by doxygen1.2.15