OmniEvents
OmniEvents::Orb Class Reference

Singleton class that owns the ORB and various initial references. More...

#include <Orb.h>

Collaboration diagram for OmniEvents::Orb:

Public Member Functions

 ~Orb ()
 Destructor needs to be public to keep MS VC++6 happy. More...
 
void resolveInitialReferences ()
 _orb must already have been initialized before this method is called. More...
 
void run ()
 Parks the main thread, but also picks up (and ignores) responses from orphan requests. More...
 
void deferredRequest (CORBA::Request_ptr req, Callback *callback=NULL)
 Adopts the request and then stores it in _deferredRequests. More...
 
void cancelCallback (const Callback *callback)
 Called by Callback objects when they are destroyed. More...
 
void reportObjectFailure (const char *here, CORBA::Object_ptr obj, CORBA::Exception *ex)
 Called by omniEvents when an object has failed (fatal exception). More...
 
void shutdown (int)
 Sets _shutdownRequested. More...
 

Static Public Member Functions

static Orbinst ()
 

Public Attributes

CORBA::ORB_var _orb
 
PortableServer::POA_var _RootPOA
 
PortableServer::POA_var _omniINSPOA
 
CosNaming::NamingContext_var _NameService
 

Private Types

typedef pair< CORBA::Request_ptr, Callback * > RequestCallback_t
 

Private Member Functions

 Orb ()
 

Private Attributes

list< RequestCallback_t_deferredRequests
 
omni_mutex _deferredRequestsLock
 
bool _shutdownRequested
 

Static Private Attributes

static Orb _inst
 

Friends

void OmniEvents_Orb_shutdown (int)
 Signal handler, sets Orb::_shutdownRequested. More...
 

Detailed Description

Singleton class that owns the ORB and various initial references.

Definition at line 69 of file Orb.h.

Member Typedef Documentation

◆ RequestCallback_t

typedef pair<CORBA::Request_ptr,Callback*> OmniEvents::Orb::RequestCallback_t
private

Definition at line 73 of file Orb.h.

Constructor & Destructor Documentation

◆ Orb()

OmniEvents::Orb::Orb ( )
inlineprivate

Definition at line 77 of file Orb.h.

◆ ~Orb()

OmniEvents::Orb::~Orb ( )

Destructor needs to be public to keep MS VC++6 happy.

Definition at line 42 of file Orb.cc.

References _deferredRequests, and _deferredRequestsLock.

Member Function Documentation

◆ cancelCallback()

void OmniEvents::Orb::cancelCallback ( const Callback callback)

Called by Callback objects when they are destroyed.

◆ deferredRequest()

◆ inst()

◆ reportObjectFailure()

void OmniEvents::Orb::reportObjectFailure ( const char *  here,
CORBA::Object_ptr  obj,
CORBA::Exception *  ex 
)

Called by omniEvents when an object has failed (fatal exception).

The failure is logged as an omniORB message with traceLevel zero.

Definition at line 204 of file Orb.cc.

References _orb, inst(), and NP_MINORSTRING.

Referenced by OmniEvents::ProxyPullConsumer_i::collect(), and OmniEvents::ProxyPushSupplier_i::trigger().

◆ resolveInitialReferences()

void OmniEvents::Orb::resolveInitialReferences ( )

_orb must already have been initialized before this method is called.

Definition at line 55 of file Orb.cc.

References _NameService, _omniINSPOA, _orb, _RootPOA, DB, IF_OMNIORB4, IFELSE_OMNIORB4, and NP_MINORSTRING.

Referenced by main().

◆ run()

void OmniEvents::Orb::run ( )

Parks the main thread, but also picks up (and ignores) responses from orphan requests.

If _shutdownRequested is set, then run() shuts down the orb and returns.

Definition at line 124 of file Orb.cc.

References _deferredRequests, _deferredRequestsLock, _shutdownRequested, DB, and IF_OMNIORB4.

Referenced by main().

◆ shutdown()

void OmniEvents::Orb::shutdown ( int  )
inline

Sets _shutdownRequested.

The parameter is ignored. This method may be used as a signal handler.

Definition at line 126 of file Orb.h.

Referenced by myShutdown().

Friends And Related Function Documentation

◆ OmniEvents_Orb_shutdown

void OmniEvents_Orb_shutdown ( int  )
friend

Signal handler, sets Orb::_shutdownRequested.

The parameter is ignored. This method may be used as a signal handler.

Definition at line 312 of file main.cc.

Member Data Documentation

◆ _deferredRequests

list<RequestCallback_t> OmniEvents::Orb::_deferredRequests
private

Definition at line 74 of file Orb.h.

Referenced by deferredRequest(), run(), and ~Orb().

◆ _deferredRequestsLock

omni_mutex OmniEvents::Orb::_deferredRequestsLock
private

Definition at line 75 of file Orb.h.

Referenced by deferredRequest(), run(), and ~Orb().

◆ _inst

Orb OmniEvents::Orb::_inst
staticprivate

Definition at line 72 of file Orb.h.

◆ _NameService

CosNaming::NamingContext_var OmniEvents::Orb::_NameService

Definition at line 91 of file Orb.h.

Referenced by resolveInitialReferences().

◆ _omniINSPOA

PortableServer::POA_var OmniEvents::Orb::_omniINSPOA

◆ _orb

◆ _RootPOA

PortableServer::POA_var OmniEvents::Orb::_RootPOA

Definition at line 89 of file Orb.h.

Referenced by OmniEvents::EventChannel_i::createPoa(), main(), and resolveInitialReferences().

◆ _shutdownRequested

bool OmniEvents::Orb::_shutdownRequested
private

Definition at line 76 of file Orb.h.

Referenced by deferredRequest(), and run().


The documentation for this class was generated from the following files: