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

TGo4CommandRunnable Class Reference

Runnable responsible for command exchange between transport (socket) and buffer (queue) In receiver mode, commands are received from transport, checked if sync or not, the command receiver of system (client) commands is set to the clienttask, sync commands are executed directly, async commands are passed to the queue in not receiver mode, runnables waits for the queue and sends all commands from the queue over the transport @stereotype thread. More...

#include <TGo4CommandRunnable.h>

Inheritance diagram for TGo4CommandRunnable:

TGo4TaskHandlerRunnable TGo4Runnable List of all members.

Public Methods

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


Private Methods

 TGo4CommandRunnable ()
void RedirectIO ()
 for error in socket: redirect cout/cerr to dummy buffer to avoid trouble if client is running in dying QProcess. More...


Private Attributes

TGo4CommandInvokerfxInvoker
 client mode: link to external (static) invoker singleton, that is used to execute the async commands before the command queue server mode: not used. More...


Detailed Description

Runnable responsible for command exchange between transport (socket) and buffer (queue) In receiver mode, commands are received from transport, checked if sync or not, the command receiver of system (client) commands is set to the clienttask, sync commands are executed directly, async commands are passed to the queue in not receiver mode, runnables waits for the queue and sends all commands from the queue over the transport @stereotype thread.

Definition at line 35 of file TGo4CommandRunnable.h.


Constructor & Destructor Documentation

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

Definition at line 36 of file TGo4CommandRunnable.cxx.

References TGo4TaskHandlerRunnable::fxBufferQueue, fxInvoker, TGo4TaskHandlerRunnable::fxTaskHandler, TGo4TaskHandlerRunnable::fxTransport, TGo4TaskHandler::GetCommandQueue(), TGo4TaskHandler::GetCommandTransport(), and TGo4CommandInvoker::Instance().

TGo4CommandRunnable::~TGo4CommandRunnable   [virtual]
 

Definition at line 48 of file TGo4CommandRunnable.cxx.

TGo4CommandRunnable::TGo4CommandRunnable   [private]
 


Member Function Documentation

Int_t TGo4CommandRunnable::Run void *    ptr [virtual]
 

The working function which runs in the thread.

Implements TGo4TaskHandlerRunnable.

Definition at line 52 of file TGo4CommandRunnable.cxx.

References TGo4BufferQueue::AddBuffer(), TGo4TaskHandlerRunnable::CheckStopBuffer(), TGo4TaskHandlerRunnable::CheckTransportOpen(), TGo4Log::Debug(), TGo4TaskHandler::fgcERROR, TGo4TaskHandler::fgcOK, TGo4SocketSignalHandler::fgiLastSignal, TGo4BufferQueue::FreeBuffer(), TGo4TaskHandlerRunnable::fxBufferQueue, TGo4Runnable::fxManager, TGo4TaskHandlerRunnable::fxTaskHandler, TGo4TaskHandlerRunnable::fxTransport, TGo4Socket::GetBuffer(), TGo4TaskHandler::GetRole(), TGo4Runnable::GetThread(), Go4EmergencyCommand_t, TGo4TaskHandler::IsClientMode(), TGo4Thread::IsRunning(), TGo4ThreadManager::IsTerminating(), kComCloseInput, kComKillMain, kComQuit, kComRestartMain, kGo4ComModeObserver, TGo4Task::KillMain(), TGo4Socket::ReceiveBuffer(), TGo4Socket::RecvRaw(), RedirectIO(), TGo4Task::RestartMain(), TGo4Socket::Send(), TGo4Socket::SendBuffer(), TGo4Thread::Stop(), TGo4Task::SubmitLocalCommand(), and TGo4BufferQueue::WaitBuffer().

void TGo4CommandRunnable::RedirectIO   [private]
 

for error in socket: redirect cout/cerr to dummy buffer to avoid trouble if client is running in dying QProcess.

Definition at line 207 of file TGo4CommandRunnable.cxx.

Referenced by Run().


Member Data Documentation

TGo4CommandInvoker* TGo4CommandRunnable::fxInvoker [private]
 

client mode: link to external (static) invoker singleton, that is used to execute the async commands before the command queue server mode: not used.

Definition at line 56 of file TGo4CommandRunnable.h.

Referenced by TGo4CommandRunnable().


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