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, ConsumerAdmin_i &consumerAdmin)
virtual ~ProxyPushConsumer_i ()
void trigger ()
CosEventChannelAdmin::ProxyPushConsumer_ptr createObject ()
 Constructs a new object. More...

void disconnect ()
 Send disconnect_push_supplier() to all connected PushSuppliers. More...

void reincarnate (const PersistNode &node)
 Re-create all servants 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< string, ConnectionConnections_t

Private Methods

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. More...


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


Member Typedef Documentation

typedef map<string,Connection> OmniEvents::ProxyPushConsumer_i::Connections_t [private]
 

Definition at line 129 of file ProxyPushConsumer.h.


Constructor & Destructor Documentation

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

Definition at line 110 of file ProxyPushConsumer.cc.

References _channelName, OmniEvents::Servant::_poa, and DB.

OmniEvents::ProxyPushConsumer_i::~ProxyPushConsumer_i   [virtual]
 

Definition at line 164 of file ProxyPushConsumer.cc.

References DB.


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 _channelName, _connections, currentObjectId(), and OmniEvents::ProxyPushConsumer_i::Connection::output().

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

References OmniEvents::Servant::_poa.

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

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

Definition at line 268 of file ProxyPushConsumer.cc.

References DB.

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

References _connections.

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

References _channelName, _connections, currentObjectId(), DB, and OmniEvents::WriteLock::os.

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

Save this object's state to a stream.

Definition at line 257 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 96 of file ProxyPushConsumer.cc.

References _consumerAdmin, _queue, _useLocalQueue, 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 195 of file ProxyPushConsumer.cc.

References _channelName, OmniEvents::PersistNode::_child, _connections, OmniEvents::Servant::_poa, and DB.

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

void OmniEvents::ProxyPushConsumer_i::trigger   [inline]
 

Definition at line 86 of file ProxyPushConsumer.h.

References _useLocalQueue.

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


Member Data Documentation

CORBA::String_var OmniEvents::ProxyPushConsumer_i::_channelName [private]
 

Definition at line 131 of file ProxyPushConsumer.h.

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

Connections_t OmniEvents::ProxyPushConsumer_i::_connections [private]
 

Definition at line 130 of file ProxyPushConsumer.h.

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

ConsumerAdmin_i& OmniEvents::ProxyPushConsumer_i::_consumerAdmin [private]
 

Definition at line 132 of file ProxyPushConsumer.h.

Referenced by push().

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

Definition at line 133 of file ProxyPushConsumer.h.

Referenced by push().

bool OmniEvents::ProxyPushConsumer_i::_useLocalQueue [private]
 

Switch between RT/chunked modes.

Definition at line 134 of file ProxyPushConsumer.h.

Referenced by push(), and trigger().


The documentation for this class was generated from the following files:
Generated on Fri Nov 19 17:42:36 2004 for OmniEvents by doxygen1.2.15