Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

OmniEvents::ProxyPushConsumer_i Class Reference

Default servant for ProxyPushConsumer objects. More...

#include <ProxyPushConsumer.h>

Inheritance diagram for OmniEvents::ProxyPushConsumer_i:

Inheritance graph
[legend]
Collaboration diagram for OmniEvents::ProxyPushConsumer_i:

Collaboration graph
[legend]
List of all members.

Public Methods

void connect_push_supplier (CosEventComm::PushSupplier_ptr pushSupplier)
 If pushSupplier is provided, then it is stored in _connections. More...

void disconnect_push_consumer ()
 We may not have a record of the supplier, so this method must accept calls from any supplier without complaint. More...

void push (const CORBA::Any &event)
 Accepts events from any supplier, not just those stored in _connections. More...

 ProxyPushConsumer_i (PortableServer::POA_ptr parentPoa, list< CORBA::Any * > &q)
virtual ~ProxyPushConsumer_i ()
CosEventChannelAdmin::ProxyPushConsumer_ptr createObject ()
 Constructs a new object. More...

void reincarnate (const char *thisOid, const char *supplierIOR=NULL)
 Re-create a servant from information saved in the log file. More...

void output (ostream &os) const
 Save this object's state to a stream. More...


Private Types

typedef map< ObjectId, CosEventComm::PushSupplier_var > Connections_t

Private Methods

ObjectId currentObjectId () const

Private Attributes

Connections_t _connections
list< CORBA::Any * > & _queue

Detailed Description

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 56 of file ProxyPushConsumer.h.


Member Typedef Documentation

typedef map<ObjectId,CosEventComm::PushSupplier_var> OmniEvents::ProxyPushConsumer_i::Connections_t [private]
 

Definition at line 106 of file ProxyPushConsumer.h.


Constructor & Destructor Documentation

OmniEvents::ProxyPushConsumer_i::ProxyPushConsumer_i PortableServer::POA_ptr    parentPoa,
list< CORBA::Any * > &    q
 

Definition at line 78 of file ProxyPushConsumer.cc.

References OmniEvents::Servant::_poa.

OmniEvents::ProxyPushConsumer_i::~ProxyPushConsumer_i   [virtual]
 

Definition at line 127 of file ProxyPushConsumer.cc.


Member Function Documentation

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 _connections, and currentObjectId().

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 134 of file ProxyPushConsumer.cc.

References OmniEvents::Servant::_poa.

Referenced by OmniEvents::SupplierAdmin_i::obtain_push_consumer().

ProxyPushConsumer_i::ObjectId OmniEvents::ProxyPushConsumer_i::currentObjectId   const [private]
 

Definition at line 195 of file ProxyPushConsumer.cc.

References OmniEvents::ProxyPushConsumer_i::ObjectId::_oid, and OmniEvents::ProxyPushConsumer_i::ObjectId::_str.

Referenced by connect_push_supplier(), and disconnect_push_consumer().

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 56 of file ProxyPushConsumer.cc.

References _connections, currentObjectId(), and DB.

void OmniEvents::ProxyPushConsumer_i::output ostream &    os const
 

Save this object's state to a stream.

Definition at line 174 of file ProxyPushConsumer.cc.

References _connections.

Referenced by OmniEvents::SupplierAdmin_i::output().

void OmniEvents::ProxyPushConsumer_i::push const CORBA::Any &    event
 

Accepts events from any supplier, not just those stored in _connections.

Definition at line 72 of file ProxyPushConsumer.cc.

References _queue.

void OmniEvents::ProxyPushConsumer_i::reincarnate const char *    thisOid,
const char *    supplierIOR = NULL
 

Re-create a servant from information saved in the log file.

Definition at line 143 of file ProxyPushConsumer.cc.

References _connections.

Referenced by OmniEvents::SupplierAdmin_i::SupplierAdmin_i().


Member Data Documentation

Connections_t OmniEvents::ProxyPushConsumer_i::_connections [private]
 

Definition at line 107 of file ProxyPushConsumer.h.

Referenced by connect_push_supplier(), disconnect_push_consumer(), output(), and reincarnate().

list<CORBA::Any*>& OmniEvents::ProxyPushConsumer_i::_queue [private]
 

Definition at line 108 of file ProxyPushConsumer.h.

Referenced by push().


The documentation for this class was generated from the following files:
Generated on Fri Dec 12 10:53:16 2003 for OmniEvents by doxygen1.2.15