| OpendTect 8.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ServiceServerMgr Class Reference
Network

`#include <serverservicebase.h>`

Inheritance diagram for ServiceServerMgr:
[legend]

## Public Types
enum | RegState { Unregistered , Requested , Confirmed , Unrequested }
Public Types inherited from ObjectWithName
typedef OD::String | name_type

## Public Member Functions
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=nullptr)
| NamedCallBacker (const NamedCallBacker &)=delete
| ~NamedCallBacker ()
virtual Notifier< NamedCallBacker > & | objectToBeDeleted () const
NamedCallBacker & | operator= (const NamedCallBacker &)=delete
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.
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.
CallBacker & | operator= (const CallBacker &)=delete
void | stopReceivingNotifications () const
virtual CallBacker * | trueCaller ()
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_type & | name () const override
NamedObject & | operator= (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

## Protected Member Functions
| 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)
void | doAppClosing (CallBacker *) override
void | doPyEnvChange (CallBacker *) override
bool | isDependentApp () const
bool | isRegistered () const
virtual bool | reportingAppIsAlive () const
void | setUnregistered ()
const Network::Service * | thisService () 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 bool | canParseAction (const char *, uiRetVal &)
virtual bool | canParseRequest (const OD::JSON::Object &, uiRetVal &)
virtual void | closeApp ()
virtual uiRetVal | doHandleAction (const char *action)
virtual uiRetVal | doHandleRequest (const OD::JSON::Object &)
virtual void | doSurveyChanged (CallBacker *)
bool | isMainService () const
void | sendErr (uiRetVal &)
void | sendOK ()
Protected Member Functions inherited from NamedCallBacker
void | sendDelNotif () const

## Private Member Functions
uiRetVal | doDeRegister ()
uiRetVal | doRegister ()
uiRetVal | doRegister_ (const char *, bool doreg)
void | init (Network::Service::ServType, bool local)
virtual void | reportToCheckCB (CallBacker *)

## Private Attributes
RegState | registerstatus_ = Unregistered
Network::Authority * | reportto_ = nullptr
Timer * | reporttocheck_ = nullptr
Network::Service * | thisservice_ = nullptr

## Additional Inherited Members
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 ()
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 ServiceMgrBase * | theMain (bool local)
Protected Attributes inherited from ServiceMgrBase
CNotifier< ServiceMgrBase, BufferString > | startHandleAction
CNotifier< ServiceMgrBase, const OD::JSON::Object * > | startHandleRequest
Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > | delalreadytriggered_
Notifier< NamedCallBacker > | delnotif_
Protected Attributes inherited from NamedObject
BufferString | name_

## Detailed Description

\ brief Base class for OpendTect external services/apps launched from another 'main' OpendTect application

<>

## Member Enumeration Documentation

## ◆ RegState

enum ServiceServerMgr::RegState

Enumerator
Unregistered |
Requested |
Confirmed |
Unrequested |

## Constructor & Destructor Documentation

## ◆ ~ServiceServerMgr()

virtual ServiceServerMgr::~ServiceServerMgr | ( |  | ) |
| virtual

## ◆ ServiceServerMgr() [1/2]

ServiceServerMgr::ServiceServerMgr | ( | Network::Service::ServType | ,
|  | const char * | servicenm )
| protected

## ◆ ServiceServerMgr() [2/2]

ServiceServerMgr::ServiceServerMgr | ( | Network::Service::ServType | ,
|  | const char * | servicenm,
|  | bool | assignport,
|  | Network::SpecAddr | = Network::Any )
| protected

## Member Function Documentation

## ◆ canReceiveRequests()

bool ServiceServerMgr::canReceiveRequests | ( |  | ) | const

## ◆ checkOnReportToApplication()

virtual void ServiceServerMgr::checkOnReportToApplication | ( | bool | startyn,
|  | int | eachms = 5000 )
| protected virtual

## ◆ doAppClosing()

void ServiceServerMgr::doAppClosing | ( | CallBacker * |  | ) |
| override protected virtual

Reimplemented from ServiceMgrBase.

Reimplemented in uiServiceServerMgr.

## ◆ doDeRegister()

uiRetVal ServiceServerMgr::doDeRegister | ( |  | ) |
| private

## ◆ doPyEnvChange()

void ServiceServerMgr::doPyEnvChange | ( | CallBacker * |  | ) |
| override protected virtual

Reimplemented from ServiceMgrBase.

## ◆ doRegister()

uiRetVal ServiceServerMgr::doRegister | ( |  | ) |
| private

## ◆ doRegister_()

uiRetVal ServiceServerMgr::doRegister_ | ( | const char * | ,
|  | bool | doreg )
| private

## ◆ init()

void ServiceServerMgr::init | ( | Network::Service::ServType | ,
|  | bool | local )
| private

## ◆ isDependentApp()

bool ServiceServerMgr::isDependentApp | ( |  | ) | const
| protected

## ◆ isRegistered()

bool ServiceServerMgr::isRegistered | ( |  | ) | const
| protected

## ◆ isStandAloneApp()

bool ServiceServerMgr::isStandAloneApp | ( |  | ) | const

## ◆ reportingAppIsAlive()

virtual bool ServiceServerMgr::reportingAppIsAlive | ( |  | ) | const
| protected virtual

Reimplemented in uiServiceServerMgr.

## ◆ reportToCheckCB()

virtual void ServiceServerMgr::reportToCheckCB | ( | CallBacker * |  | ) |
| private virtual

Reimplemented in BatchServiceServerMgr.

## ◆ sendAction()

virtual uiRetVal ServiceServerMgr::sendAction | ( | const char * | act,
|  | const Network::Authority * | = nullptr,
|  | const char * | servicenm = nullptr ) const
| virtual

## ◆ sendActionRequest()

virtual uiRetVal ServiceServerMgr::sendActionRequest | ( | const char * | reqkey,
|  | const char * | act,
|  | const OD::JSON::Object * | morereq = nullptr,
|  | const Network::Authority * | = nullptr,
|  | const char * | servicenm = nullptr ) const
| virtual

## ◆ sendRequest()

virtual uiRetVal ServiceServerMgr::sendRequest | ( | const char * | reqkey,
|  | const OD::JSON::Object & | ,
|  | const Network::Authority * | = nullptr,
|  | const char * | servicenm = nullptr ) const
| virtual

## ◆ setUnregistered()

void ServiceServerMgr::setUnregistered | ( |  | ) |
| inline protected

## ◆ thisService()

const Network::Service * ServiceServerMgr::thisService | ( |  | ) | const
| inline protected

## Member Data Documentation

## ◆ registerstatus_

RegState ServiceServerMgr::registerstatus_ = Unregistered
| private

## ◆ reportto_

Network::Authority* ServiceServerMgr::reportto_ = nullptr
| private

## ◆ reporttocheck_

Timer* ServiceServerMgr::reporttocheck_ = nullptr
| private

## ◆ thisservice_

Network::Service* ServiceServerMgr::thisservice_ = nullptr
| private

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