OpendTect  7.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ServiceClientMgr Class Referenceabstract
Inheritance diagram for ServiceClientMgr:
[legend]

Public Member Functions

virtual ~ServiceClientMgr ()
 
BufferString getLockFileFP (const Network::Service::ID) const
 
bool isAlive (const Network::Service::ID) const
 
bool isPresent (const Network::Service::ID) const
 
void printInfo (const Network::Service::ID, const char *desc=nullptr, od_ostream *=nullptr) const
 
uiRetVal sendAction (const Network::Service::ID, const char *) const
 
uiRetVal sendRequest (const Network::Service::ID, const char *, const OD::JSON::Object &) const
 
BufferString serviceName (const Network::Service::ID) const
 
Network::Service::SubID serviceSubID (const Network::Service::ID) const
 
bool stopService (const Network::Service::ID)
 
- 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
 
virtual CallBackertrueCaller ()
 
- 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 &)
 
const name_typename () const override
 
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 bool addApplicationAuthority (OS::MachineCommand &)
 
- 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 ()
 

Public Attributes

CNotifier< ServiceClientMgr, Network::Service::IDserviceAdded
 
CNotifier< ServiceClientMgr, Network::Service::IDserviceRemoved
 

Protected Member Functions

 ServiceClientMgr (const char *servicenm)
 
 ServiceClientMgr (const char *servicenm, bool assignport, Network::SpecAddr=Network::Any)
 
virtual bool canClaimService (const Network::Service &) const =0
 
bool canParseAction (const char *, uiRetVal &) override
 
bool canParseRequest (const OD::JSON::Object &, uiRetVal &) override
 
bool checkService (const Network::Service::ID) const
 
void closeApp () override
 
void doAppClosing (CallBacker *) override
 
uiRetVal doHandleAction (const char *action) override
 
uiRetVal doHandleRequest (const OD::JSON::Object &) override
 
Network::ServicegetService (const Network::Service::ID)
 
const Network::ServicegetService (const Network::Service::ID) const
 
uiRetVal sendAction (const Network::Service &, const char *) const
 
uiRetVal sendRequest (const Network::Service &, const char *, const OD::JSON::Object &) 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 doPyEnvChange (CallBacker *)
 
virtual void doSurveyChanged (CallBacker *)
 
bool isMainService () const
 
void sendErr (uiRetVal &)
 
void sendOK ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

ObjectSet< Network::Serviceservices_
 
CNotifier< ServiceClientMgr, Network::Service * > serviceToBeAdded
 
CNotifier< ServiceClientMgr, Network::Service * > serviceToBeRemoved
 
- 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

uiRetVal addService (const OD::JSON::Object &)
 
void addService (Network::Service &)
 
void cleanupServices ()
 
void init (bool local)
 
bool removeService (const Network::Service::ID)
 
uiRetVal removeService (const OD::JSON::Object &)
 

Additional Inherited Members

- 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 ()
 
static const ServiceMgrBasetheMain (bool local)
 

Detailed Description

\ brief Base class for client applications that register spawn services and provide interaction with them

<>

Constructor & Destructor Documentation

◆ ~ServiceClientMgr()

virtual ServiceClientMgr::~ServiceClientMgr ( )
virtual

◆ ServiceClientMgr() [1/2]

ServiceClientMgr::ServiceClientMgr ( const char *  servicenm)
protected

◆ ServiceClientMgr() [2/2]

ServiceClientMgr::ServiceClientMgr ( const char *  servicenm,
bool  assignport,
Network::SpecAddr  = Network::Any 
)
protected

Member Function Documentation

◆ addApplicationAuthority()

static bool ServiceClientMgr::addApplicationAuthority ( OS::MachineCommand )
static

◆ addService() [1/2]

uiRetVal ServiceClientMgr::addService ( const OD::JSON::Object )
private

◆ addService() [2/2]

void ServiceClientMgr::addService ( Network::Service )
private

◆ canClaimService()

virtual bool ServiceClientMgr::canClaimService ( const Network::Service ) const
protectedpure virtual

◆ canParseAction()

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

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceClientMgr, and BatchServiceClientMgr.

◆ canParseRequest()

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

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceClientMgr, and BatchServiceClientMgr.

◆ checkService()

bool ServiceClientMgr::checkService ( const Network::Service::ID  ) const
protected

◆ cleanupServices()

void ServiceClientMgr::cleanupServices ( )
private

◆ closeApp()

void ServiceClientMgr::closeApp ( )
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceClientMgr.

◆ doAppClosing()

void ServiceClientMgr::doAppClosing ( CallBacker )
overrideprotectedvirtual

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceClientMgr, and BatchServiceClientMgr.

◆ doHandleAction()

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

Reimplemented from ServiceMgrBase.

Reimplemented in BatchServiceClientMgr, and uiServiceClientMgr.

◆ doHandleRequest()

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

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceClientMgr, and BatchServiceClientMgr.

◆ getLockFileFP()

BufferString ServiceClientMgr::getLockFileFP ( const Network::Service::ID  ) const

◆ getService() [1/2]

Network::Service* ServiceClientMgr::getService ( const Network::Service::ID  )
protected

◆ getService() [2/2]

const Network::Service* ServiceClientMgr::getService ( const Network::Service::ID  ) const
protected

◆ init()

void ServiceClientMgr::init ( bool  local)
private

◆ isAlive()

bool ServiceClientMgr::isAlive ( const Network::Service::ID  ) const

◆ isPresent()

bool ServiceClientMgr::isPresent ( const Network::Service::ID  ) const

◆ printInfo()

void ServiceClientMgr::printInfo ( const Network::Service::ID  ,
const char *  desc = nullptr,
od_ostream = nullptr 
) const

◆ removeService() [1/2]

bool ServiceClientMgr::removeService ( const Network::Service::ID  )
private

◆ removeService() [2/2]

uiRetVal ServiceClientMgr::removeService ( const OD::JSON::Object )
private

◆ sendAction() [1/2]

uiRetVal ServiceClientMgr::sendAction ( const Network::Service ,
const char *   
) const
protected

◆ sendAction() [2/2]

uiRetVal ServiceClientMgr::sendAction ( const Network::Service::ID  ,
const char *   
) const

◆ sendRequest() [1/2]

uiRetVal ServiceClientMgr::sendRequest ( const Network::Service ,
const char *  ,
const OD::JSON::Object  
) const
protected

◆ sendRequest() [2/2]

uiRetVal ServiceClientMgr::sendRequest ( const Network::Service::ID  ,
const char *  ,
const OD::JSON::Object  
) const

◆ serviceName()

BufferString ServiceClientMgr::serviceName ( const Network::Service::ID  ) const

◆ serviceSubID()

Network::Service::SubID ServiceClientMgr::serviceSubID ( const Network::Service::ID  ) const

◆ stopService()

bool ServiceClientMgr::stopService ( const Network::Service::ID  )

Member Data Documentation

◆ serviceAdded

CNotifier<ServiceClientMgr,Network::Service::ID> ServiceClientMgr::serviceAdded

◆ serviceRemoved

CNotifier<ServiceClientMgr,Network::Service::ID> ServiceClientMgr::serviceRemoved

◆ services_

ObjectSet<Network::Service> ServiceClientMgr::services_
protected

◆ serviceToBeAdded

CNotifier<ServiceClientMgr,Network::Service*> ServiceClientMgr::serviceToBeAdded
protected

◆ serviceToBeRemoved

CNotifier<ServiceClientMgr,Network::Service*> ServiceClientMgr::serviceToBeRemoved
protected

Notifies implementations that a service is about to be registered/doregistered


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