OmniEvents
|
Singleton class that owns the ORB and various initial references. More...
#include <Orb.h>
Public Member Functions | |
~Orb () | |
Destructor needs to be public to keep MS VC++6 happy. | |
void | resolveInitialReferences () |
_orb must already have been initialized before this method is called. | |
void | run () |
Parks the main thread, but also picks up (and ignores) responses from orphan requests. | |
void | deferredRequest (CORBA::Request_ptr req, Callback *callback=NULL) |
Adopts the request and then stores it in _deferredRequests. | |
void | cancelCallback (const Callback *callback) |
Called by Callback objects when they are destroyed. | |
void | reportObjectFailure (const char *here, CORBA::Object_ptr obj, CORBA::Exception *ex) |
Called by omniEvents when an object has failed (fatal exception). | |
void | shutdown (int) |
Sets _shutdownRequested. | |
Static Public Member Functions | |
static Orb & | inst () |
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. | |
Singleton class that owns the ORB and various initial references.
|
private |
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.
Called by Callback objects when they are destroyed.
Adopts the request and then stores it in _deferredRequests.
run() later picks up the responses and forwards them to 'callback', if it is set.
Definition at line 187 of file Orb.cc.
References _deferredRequests, _deferredRequestsLock, and _shutdownRequested.
Referenced by OmniEvents::ProxyPullConsumer_i::collect(), OmniEvents::ProxyPushSupplier_i::connect_push_consumer(), OmniEvents::ProxyPushConsumer_i::connect_push_supplier(), OmniEvents::ProxyPushConsumer_i::disconnect(), OmniEvents::ProxyPullConsumer_i::disconnect_pull_consumer(), OmniEvents::ProxyPullSupplier_i::disconnect_pull_supplier(), OmniEvents::ProxyPushConsumer_i::disconnect_push_consumer(), OmniEvents::ProxyPushSupplier_i::disconnect_push_supplier(), OmniEvents::ProxyPushSupplier_i::trigger(), and OmniEvents::Proxy::~Proxy().
Definition at line 81 of file Orb.h.
References _inst.
Referenced by OmniEvents::Proxy::basicOutput(), OmniEvents::ProxyPullConsumer_i::collect(), OmniEvents::ProxyPushSupplier_i::connect_push_consumer(), OmniEvents::ProxyPushConsumer_i::connect_push_supplier(), OmniEvents::EventChannel_i::createPoa(), OmniEvents::ProxyPushConsumer_i::currentObjectId(), OmniEvents::ProxyPushConsumer_i::disconnect(), OmniEvents::ProxyPullConsumer_i::disconnect_pull_consumer(), OmniEvents::ProxyPullSupplier_i::disconnect_pull_supplier(), OmniEvents::ProxyPushConsumer_i::disconnect_push_consumer(), OmniEvents::ProxyPushSupplier_i::disconnect_push_supplier(), OmniEvents::EventChannelFactory_i::join_channel(), main(), myShutdown(), OmniEvents::ProxyPushConsumer_i::Connection::output(), reportObjectFailure(), OmniEvents::string_to_(), OmniEvents::ProxyPushSupplier_i::trigger(), and OmniEvents::Proxy::~Proxy().
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().
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().
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().
Sets _shutdownRequested.
The parameter is ignored. This method may be used as a signal handler.
Definition at line 126 of file Orb.h.
References _shutdownRequested.
Referenced by myShutdown().
Signal handler, sets Orb::_shutdownRequested.
The parameter is ignored. This method may be used as a signal handler.
|
private |
Definition at line 74 of file Orb.h.
Referenced by deferredRequest(), run(), and ~Orb().
|
private |
Definition at line 75 of file Orb.h.
Referenced by deferredRequest(), run(), and ~Orb().
CosNaming::NamingContext_var OmniEvents::Orb::_NameService |
Definition at line 91 of file Orb.h.
Referenced by resolveInitialReferences().
PortableServer::POA_var OmniEvents::Orb::_omniINSPOA |
Definition at line 90 of file Orb.h.
Referenced by OmniEvents::EventChannelFactory_i::join_channel(), and resolveInitialReferences().
CORBA::ORB_var OmniEvents::Orb::_orb |
Definition at line 88 of file Orb.h.
Referenced by OmniEvents::Proxy::basicOutput(), main(), OmniEvents::ProxyPushConsumer_i::Connection::output(), reportObjectFailure(), resolveInitialReferences(), and OmniEvents::string_to_().
PortableServer::POA_var OmniEvents::Orb::_RootPOA |
Definition at line 89 of file Orb.h.
Referenced by OmniEvents::EventChannel_i::createPoa(), main(), and resolveInitialReferences().
|
private |
Definition at line 76 of file Orb.h.
Referenced by deferredRequest(), run(), and shutdown().