14#ifndef TGO4SERVERTASK_H
15#define TGO4SERVERTASK_H
35 UInt_t negotiationport = 0,
36 Bool_t blockingmode = kFALSE,
37 Bool_t standalone = kFALSE,
38 Bool_t autostart = kTRUE,
39 Bool_t autocreate = kTRUE,
40 Bool_t ismaster = kTRUE);
146 virtual Bool_t
RemoveClient(
const char *name, Bool_t clientwait=kTRUE, Bool_t isterminating=kFALSE);
Class containing a pointer queue for TBuffers.
This is the Go4 Abstract Command Class; part of the Base command pattern.
Class containing a pointer queue for objects.
static const UInt_t fguCONNECTWAITCYCLETIME
time for each connect wait cycle
Bool_t fbKeepServerSocket
True if open in server mode shall keep the server socket instance.
Bool_t RemoveCurrentClient()
removes the currently active client from server (disconnect)
static const UInt_t fguCLOSEWAITCYCLETIME
time for each close wait cycle
void SendStatus(TGo4Status *stat, const char *receiver=nullptr) override
Send status object via status channel to the master.
Bool_t ConnectorThreadIsStopped()
Returns the waiting state fbIsWaiting of the Connector Thread;.
TGo4Command * NextCommand() override
Delivers next command.
const char * GetConnectorName() const
TGo4ServerTask(const char *name, UInt_t negotiationport=0, Bool_t blockingmode=kFALSE, Bool_t standalone=kFALSE, Bool_t autostart=kTRUE, Bool_t autocreate=kTRUE, Bool_t ismaster=kTRUE)
virtual Bool_t StartConnectorThread()
starts the thread that listens to the connector port for a client negotiation request; used after lau...
virtual ~TGo4ServerTask()
TGo4TaskHandler * GetCurrentTaskHandler()
Get task handler of the currently activated client connection.
void SendStatusBuffer() override
Send internal status buffer to the master(s).
static const UInt_t fguCONNECTTIMERPERIOD
period of task connector timer
TGo4BufferQueue * GetStatusQueue(const char *task=nullptr) override
void SetCurrentTask(const char *name)
sets current client task (i.e.
TGo4Socket * GetConnectTransport()
TGo4TaskManager * fxTaskManager
aggregationByValue 1
virtual Int_t TimerConnect()
this method is used by the connectortimer Notify to connect or disconnect a transportchannel (TSocket...
TGo4Socket * fxDisConnectTransport
link to the next TaskHandler transport instance that shall be disconnected by the Application Control...
static const Int_t fgiOPENWAITCYCLES
maximum cycles to wait until transport is open
virtual Int_t RemoveAllClients(Bool_t force=false)
Remove all connected client task from this server.
static const char * Get_fgcLAUNCHPREFSFILE()
UInt_t fuConnectPort
port number for timer connect
static const UInt_t fguOPENWAITCYCLETIME
time for each open wait cycle
TGo4BufferQueue * GetCommandQueue(const char *task=nullptr) override
Bool_t fbConnectIsClose
True if fxConnectTransport has returned from Close(), i.e.
static const char * fgcLAUNCHPREFSFILE
Name of the Preferences file for the client startup.
Bool_t fbConnectIsOpen
True if fxConnectTransport waits in server Open() call.
Int_t WaitForConnection()
Bool_t fbDisConnectRequest
True if fxConnectTransport shall be Close() by AppControlTimer.
void Quit() override
Quit method used by quit command; may be overridden in special application.
Bool_t fbConnectRequest
True if fxConnectTransport shall be Open() by AppControlTimer.
TGo4TaskManager * GetTaskManager()
Bool_t fbConnectIsDone
True if fxConnectTransport has returned from Open(), i.e.
const char * GetConnectHost() const
void SetConnect(TGo4Socket *trans, const char *host, UInt_t port, Bool_t keepserv=kFALSE)
static const Int_t fgiCLOSEWAITCYCLES
maximum cycles to wait until transport is closed
TString fxConnectHost
hostname for timer connect
TGo4BufferQueue * GetDataQueue(const char *task=nullptr) override
void Shutdown()
Fast Quit() without waiting for proper disconnection.
TGo4TaskHandler * fxCurrentTaskHandler
1
virtual Bool_t StopConnectorThread()
stops the thread that listens to the connector port for a client negotiation request; used before lau...
TString fxConnectorName
remember name of connector thread
TGo4Socket * fxConnectTransport
link to the next TaskHandler transport instance that shall be connected by the Application Control Ti...
static const Int_t fgiCONNECTWAITCYCLES
maximum cycles to wait until transport is connected
TGo4TaskConnectorTimer * fxConnectorTimer
timer responsible for the connection/disconnection of clients; independent of application control tim...
void SetDisConnect(TGo4Socket *trans)
virtual Bool_t RemoveClient(const char *name, Bool_t clientwait=kTRUE, Bool_t isterminating=kFALSE)
Remove the client task specified by name from this server.
TGo4TaskHandler * GetTaskHandler() override
Get task handler for client specified by name.
timer aggregated to the servertask which is responsible to open and handle the negotiation requests o...
This class is responsible for the interconnection of two tasks: provided are three communication chan...
TGo4Task(const char *name, Bool_t blockingmode, Bool_t autostart=kFALSE, Bool_t autocreate=kTRUE, Bool_t ismaster=kFALSE)