OpendTect  6.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
BatchServiceServerMgr Class Reference

Service manager for all OpendTect batch programs. Allows informing od_main on the program of the batch program, and getting data required to perform the work from the main application. More...

Inheritance diagram for BatchServiceServerMgr:
[legend]

Public Member Functions

virtual ~BatchServiceServerMgr ()
 
bool isOK () const
 
- Public Member Functions inherited from ServiceServerMgr
virtual ~ServiceServerMgr ()
 
bool canReceiveRequests () const
 
bool isStandAloneApp () const
 
virtual uiRetVal sendAction (const char *act, const Network::Authority *=nullptr, const char *servicenm=nullptr) const
 
virtual uiRetVal sendActionRequest (const char *reqkey, const char *act, const OD::JSON::Object *morereq=nullptr, const Network::Authority *=nullptr, const char *servicenm=nullptr) const
 
virtual uiRetVal sendRequest (const char *reqkey, const OD::JSON::Object &, const Network::Authority *=nullptr, const char *servicenm=nullptr) const
 
- Public Member Functions inherited from ServiceMgrBase
virtual ~ServiceMgrBase ()
 
Network::Authority getAuthority (bool islocal) const
 
bool isOK (bool islocal) const
 
virtual void stopServer (bool islocal)
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static BatchServiceServerMgrgetMgr ()
 
- Static Public Member Functions inherited from ServiceMgrBase
static const char * sKeyCloseEv ()
 
static const char * sKeyDeregister ()
 
static const char * sKeyEvent ()
 
static const char * sKeyODServer ()
 
static const char * sKeyPyEnvChangeEv ()
 
static const char * sKeyRegister ()
 
static const char * sKeyStatusEv ()
 
static const char * sKeySurveyChangeEv ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

 BatchServiceServerMgr ()
 
bool canParseAction (const char *, uiRetVal &) override
 
bool canParseRequest (const OD::JSON::Object &, uiRetVal &) override
 
void closeApp () override
 
void doAppClosing (CallBacker *) override
 
uiRetVal doHandleAction (const char *action) override
 
uiRetVal doHandleRequest (const OD::JSON::Object &) override
 
void killedCB (CallBacker *)
 
void pausedCB (CallBacker *)
 
void resumedCB (CallBacker *)
 
void workEnded (CallBacker *)
 
void workStartedCB (CallBacker *)
 
- Protected Member Functions inherited from ServiceServerMgr
 ServiceServerMgr (Network::Service::ServType, const char *servicenm)
 
 ServiceServerMgr (Network::Service::ServType, const char *servicenm, bool assignport, Network::SpecAddr=Network::Any)
 
virtual void checkOnReportToApplication (bool startyn, int eachms=5000)
 
bool isDependentApp () const
 
bool isRegistered () const
 
virtual bool reportingAppIsAlive () const
 
void setUnregistered ()
 
const Network::ServicethisService () const
 
- Protected Member Functions inherited from ServiceMgrBase
 ServiceMgrBase (const char *servicenm)
 
 ServiceMgrBase (const char *servicenm, bool assignport, Network::SpecAddr=Network::Any)
 
bool addLocalServer ()
 
bool addTCPServer (bool assignport=true, Network::SpecAddr=Network::Any)
 
virtual void doSurveyChanged (CallBacker *)
 
bool isMainService () const
 
void sendErr (uiRetVal &)
 
void sendOK ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

uiRetVal lastreport_
 
- Protected Attributes inherited from ServiceMgrBase
CNotifier< ServiceMgrBase, BufferStringstartHandleAction
 
CNotifier< ServiceMgrBase, const OD::JSON::Object * > startHandleRequest
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

void reportToCheckCB (CallBacker *) override
 
uiRetVal sendActionRequest_ (const char *action, const OD::JSON::Object *=nullptr)
 

Private Attributes

BatchProgrambp_
 

Friends

class BatchProgram
 

Additional Inherited Members

- Public Types inherited from ServiceServerMgr
enum  RegState { Unregistered , Requested , Confirmed , Unrequested }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 
- Static Protected Member Functions inherited from ServiceMgrBase
static bool addApplicationAuthority (bool local, OS::MachineCommand &)
 
static void debugMsg (const char *)
 
static void getPythEnvRequestInfo (OD::JSON::Object &)
 
static uiRetVal sendAction (const Network::Authority &, const char *servicenm, const char *action)
 
static uiRetVal sendRequest (const Network::Authority &, const char *servicenm, const char *reqkey, const OD::JSON::Object &)
 
static const char * sKeyClientAppCloseEv ()
 
static const ServiceMgrBasetheMain ()
 

Detailed Description

Service manager for all OpendTect batch programs. Allows informing od_main on the program of the batch program, and getting data required to perform the work from the main application.

<>

Constructor & Destructor Documentation

◆ ~BatchServiceServerMgr()

virtual BatchServiceServerMgr::~BatchServiceServerMgr ( )
virtual

◆ BatchServiceServerMgr()

BatchServiceServerMgr::BatchServiceServerMgr ( )
protected

Member Function Documentation

◆ canParseAction()

bool BatchServiceServerMgr::canParseAction ( const char *  ,
uiRetVal  
)
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

◆ canParseRequest()

bool BatchServiceServerMgr::canParseRequest ( const OD::JSON::Object ,
uiRetVal  
)
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

◆ closeApp()

void BatchServiceServerMgr::closeApp ( )
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

◆ doAppClosing()

void BatchServiceServerMgr::doAppClosing ( CallBacker )
overrideprotectedvirtual

Reimplemented from ServiceServerMgr.

◆ doHandleAction()

uiRetVal BatchServiceServerMgr::doHandleAction ( const char *  action)
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

◆ doHandleRequest()

uiRetVal BatchServiceServerMgr::doHandleRequest ( const OD::JSON::Object )
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

◆ getMgr()

static BatchServiceServerMgr& BatchServiceServerMgr::getMgr ( )
static

◆ isOK()

bool BatchServiceServerMgr::isOK ( ) const

◆ killedCB()

void BatchServiceServerMgr::killedCB ( CallBacker )
protected

◆ pausedCB()

void BatchServiceServerMgr::pausedCB ( CallBacker )
protected

◆ reportToCheckCB()

void BatchServiceServerMgr::reportToCheckCB ( CallBacker )
overrideprivatevirtual

Reimplemented from ServiceServerMgr.

◆ resumedCB()

void BatchServiceServerMgr::resumedCB ( CallBacker )
protected

◆ sendActionRequest_()

uiRetVal BatchServiceServerMgr::sendActionRequest_ ( const char *  action,
const OD::JSON::Object = nullptr 
)
private

◆ workEnded()

void BatchServiceServerMgr::workEnded ( CallBacker )
protected

◆ workStartedCB()

void BatchServiceServerMgr::workStartedCB ( CallBacker )
protected

Friends And Related Function Documentation

◆ BatchProgram

friend class BatchProgram
friend

Member Data Documentation

◆ bp_

BatchProgram& BatchServiceServerMgr::bp_
private

◆ lastreport_

uiRetVal BatchServiceServerMgr::lastreport_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022