54 TBuffer *buffer =
const_cast<TBuffer *
> (
fxTransport->GetBuffer());
70 TGo4Log::Debug(
" Command runnable executing direct command QUIT... ");
79 TGo4Log::Debug(
" Command runnable executing direct command KILL MAIN... ");
84 TGo4Log::Debug(
" Command runnable executing direct command RESTART MAIN... ");
89 TGo4Log::Debug(
"NEVER COME HERE: Command runnable has direct command CLOSE INPUT");
97 TGo4Log::Debug(
" Command runnable direct command value %d UNKNOWN!", comvalue);
119 TGo4Log::Debug(
"Receive Error in %s during threadmanager termination. Ignored.",GetName());
125 TGo4Log::Debug(
"Receive Error in %s, aborting taskhandler...",GetName());
141 if(stopmode)
return 0;
157 TGo4Log::Debug(
" !!!Connection Error -1 in CommandRunnable ''%s''!!!",GetName());
174 TGo4Log::Debug(
" CommandRunnable ''%s'' received command error string!!!",GetName());
179 TGo4Log::Debug(
" !!!Connection Error -3 in CommandRunnable ''%s''!!!",GetName());
203 std::ostringstream* strout =
new std::ostringstream;
205 std::cout.rdbuf(strout->rdbuf());
206 std::ostringstream* strerr =
new std::ostringstream;
208 std::cerr.rdbuf(strerr->rdbuf());
Class containing a pointer queue for TBuffers.
Command to quit (terminate) the client, after successful quit, the client may be removed from taskman...
static TGo4CommandInvoker * Instance()
Int_t Run(void *ptr) override
The working function which runs in the thread.
void RedirectIO()
for error in socket: redirect std::cout/std::cerr to dummy buffer to avoid trouble if client is runni...
TGo4CommandInvoker * fxInvoker
client mode: link to external (static) invoker singleton, that is used to execute the async commands ...
virtual ~TGo4CommandRunnable()
static void Debug(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 0.
TGo4Thread * GetThread() const
TGo4ThreadManager * fxManager
The threadmanager which is responsible for our thread.
static bool IsLastSignalWINCH()
static void SetLastSignal(Int_t v=0)
Bool_t fbReceiverMode
flag indicating operation mode of runnable, depending on client or server mode of task handler
Bool_t CheckTransportOpen()
Test if socket transport exists and is open.
Bool_t CheckStopBuffer(TBuffer *buf, Int_t *result=nullptr)
Test if buffer contains a message to stop this runnable.
TGo4TaskHandler * fxTaskHandler
link to external task handler (for server mode) 1 1
TGo4Socket * fxTransport
link to external inter-tasl transport channel
TGo4TaskHandlerRunnable(const char *name, TGo4ThreadManager *man, TGo4TaskHandler *hand, Bool_t receivermode=kTRUE)
TGo4BufferQueue * fxBufferQueue
Link to external buffer queue.
This class is responsible for the interconnection of two tasks: provided are three communication chan...
static const char * Get_fgcERROR()
static const char * Get_fgcOK()
Bool_t SubmitLocalCommand(TGo4Command *com)
Send given command to the current client task.
virtual void RestartMain()
Restart the main thread; method to be called from command, should be overridden in user implementatio...
virtual void KillMain()
Kill the main thread; method to be called from command, should be overridden in user implementation.
Bool_t Stop()
resets running flag for runnable