OmniEvents
|
Default servant for ProxyPushConsumer objects. More...
#include <ProxyPushConsumer.h>
Classes | |
struct | Connection |
Public Member Functions | |
void | connect_push_supplier (CosEventComm::PushSupplier_ptr pushSupplier) |
If pushSupplier is provided, then it is stored in _connections. | |
void | disconnect_push_consumer () |
We may not have a record of the supplier, so this method must accept calls from any supplier without complaint. | |
void | push (const CORBA::Any &event) |
Accepts events from any supplier, not just those stored in _connections. | |
ProxyPushConsumer_i (PortableServer::POA_ptr parentPoa, list< CORBA::Any * > &q, ConsumerAdmin_i &consumerAdmin) | |
virtual | ~ProxyPushConsumer_i () |
void | trigger () |
CosEventChannelAdmin::ProxyPushConsumer_ptr | createObject () |
Constructs a new object. | |
void | disconnect () |
Send disconnect_push_supplier() to all connected PushSuppliers. | |
void | reincarnate (const PersistNode &node) |
Re-create all servants from information saved in the log file. | |
void | output (ostream &os) const |
Save this object's state to a stream. | |
![]() | |
virtual PortableServer::POA_ptr | _default_POA () |
virtual | ~Servant () |
Private Types | |
typedef map< string, Connection * > | Connections_t |
Private Member Functions | |
string | currentObjectId () const |
Private Attributes | |
Connections_t | _connections |
CORBA::String_var | _channelName |
ConsumerAdmin_i & | _consumerAdmin |
list< CORBA::Any * > & | _queue |
bool | _useLocalQueue |
Switch between RT/chunked modes. | |
Additional Inherited Members | |
![]() | |
Servant (PortableServer::POA_ptr poa) | |
void | activateObjectWithId (const char *oidStr) |
Calls activate_object_with_id() to activate this servant in its POA. | |
void | deactivateObject () |
Calls deactivate_object() to deactivate this servant in its POA. | |
![]() | |
PortableServer::POA_var | _poa |
Default servant for ProxyPushConsumer objects.
All objects are implemented by a single instance of this servant class. This enables us to deal statelessly with anonymous connections (where connect_push_supplier() is called with a NIL callback reference).
Definition at line 60 of file ProxyPushConsumer.h.
Definition at line 133 of file ProxyPushConsumer.h.
OmniEvents::ProxyPushConsumer_i::ProxyPushConsumer_i | ( | PortableServer::POA_ptr | parentPoa, |
list< CORBA::Any * > & | q, | ||
ConsumerAdmin_i & | consumerAdmin | ||
) |
Definition at line 116 of file ProxyPushConsumer.cc.
References _channelName, _consumerAdmin, OmniEvents::Servant::_poa, OmniEvents::createNarrowedReference(), and DB.
|
virtual |
Definition at line 178 of file ProxyPushConsumer.cc.
References _connections, _consumerAdmin, and DB.
void OmniEvents::ProxyPushConsumer_i::connect_push_supplier | ( | CosEventComm::PushSupplier_ptr | pushSupplier | ) |
If pushSupplier is provided, then it is stored in _connections.
Otherwise this method does nothing.
Definition at line 34 of file ProxyPushConsumer.cc.
References _channelName, _connections, OmniEvents::createNarrowedReference(), currentObjectId(), OmniEvents::Orb::deferredRequest(), OmniEvents::omniEventsLog::exists(), OmniEvents::Orb::inst(), and OmniEvents::WriteLock::os.
CosEventChannelAdmin::ProxyPushConsumer_ptr OmniEvents::ProxyPushConsumer_i::createObject | ( | ) |
Constructs a new object.
This method is almost completely stateless. It makes a new objectId, and returns it to the caller. But, only when it's USED the first time (connect_push_consumer) do we store it in _connections. (Note, The POA doesn't store objects either.)
Definition at line 194 of file ProxyPushConsumer.cc.
References OmniEvents::Servant::_poa, and OmniEvents::createNarrowedReference().
Referenced by OmniEvents::SupplierAdmin_i::obtain_push_consumer().
|
private |
Definition at line 295 of file ProxyPushConsumer.cc.
References OmniEvents::createNarrowedReference(), DB, and OmniEvents::Orb::inst().
Referenced by connect_push_supplier(), and disconnect_push_consumer().
void OmniEvents::ProxyPushConsumer_i::disconnect | ( | ) |
Send disconnect_push_supplier() to all connected PushSuppliers.
Definition at line 203 of file ProxyPushConsumer.cc.
References _connections, OmniEvents::createNarrowedReference(), OmniEvents::Orb::deferredRequest(), and OmniEvents::Orb::inst().
Referenced by OmniEvents::SupplierAdmin_i::disconnect().
void OmniEvents::ProxyPushConsumer_i::disconnect_push_consumer | ( | ) |
We may not have a record of the supplier, so this method must accept calls from any supplier without complaint.
Definition at line 71 of file ProxyPushConsumer.cc.
References _channelName, _connections, OmniEvents::createNarrowedReference(), currentObjectId(), DB, OmniEvents::Orb::deferredRequest(), OmniEvents::omniEventsLog::exists(), OmniEvents::Orb::inst(), and OmniEvents::WriteLock::os.
Save this object's state to a stream.
Definition at line 284 of file ProxyPushConsumer.cc.
References _connections.
Referenced by OmniEvents::ProxyPushConsumer_i::Connection::callback(), and OmniEvents::SupplierAdmin_i::output().
Accepts events from any supplier, not just those stored in _connections.
Definition at line 102 of file ProxyPushConsumer.cc.
References _consumerAdmin, _queue, _useLocalQueue, OmniEvents::createNarrowedReference(), and OmniEvents::ConsumerAdmin_i::send().
void OmniEvents::ProxyPushConsumer_i::reincarnate | ( | const PersistNode & | node | ) |
Re-create all servants from information saved in the log file.
Definition at line 222 of file ProxyPushConsumer.cc.
References _channelName, _connections, OmniEvents::Servant::_poa, OmniEvents::createNarrowedReference(), and DB.
Referenced by OmniEvents::SupplierAdmin_i::reincarnate().
|
inline |
Definition at line 86 of file ProxyPushConsumer.h.
References _useLocalQueue.
|
private |
Definition at line 135 of file ProxyPushConsumer.h.
Referenced by connect_push_supplier(), disconnect_push_consumer(), OmniEvents::ProxyPushConsumer_i::Connection::output(), ProxyPushConsumer_i(), and reincarnate().
|
private |
Definition at line 134 of file ProxyPushConsumer.h.
Referenced by connect_push_supplier(), disconnect(), disconnect_push_consumer(), output(), reincarnate(), and ~ProxyPushConsumer_i().
|
private |
Definition at line 136 of file ProxyPushConsumer.h.
Referenced by ProxyPushConsumer_i(), push(), and ~ProxyPushConsumer_i().
|
private |
Definition at line 137 of file ProxyPushConsumer.h.
Referenced by push().
|
private |
Switch between RT/chunked modes.
Definition at line 138 of file ProxyPushConsumer.h.