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

OmniEvents::ProxyPullConsumer_i Class Reference

Implementation of the ProxyPullConsumer interface. More...

#include <ProxyPullConsumer.h>

Inheritance diagram for OmniEvents::ProxyPullConsumer_i:

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

Collaboration graph
[legend]
List of all members.

Public Methods

void connect_pull_supplier (CosEventComm::PullSupplier_ptr pullSupplier)
void disconnect_pull_consumer ()
 ProxyPullConsumer_i (PortableServer::POA_ptr poa, list< CORBA::Any * > &q)
void trigger ()
void reincarnate (const OEP_prxy &prxy)
 Re-create a servant from information saved in the log file. More...

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


Private Types

enum  Mode { Pull = 0, TryPull = 1 }
 This proxy can call out in either pull() or try_pull() mode. More...


Private Attributes

CosEventComm::PullSupplier_var _target
list< CORBA::Any * > & _queue
int _exceptionCount [2]
 Only when two consecutive exceptions have been received from each mode, do we consider the connection dead. More...


Detailed Description

Implementation of the ProxyPullConsumer interface.

Tries to get messages by using pull() then try_pull() method calls, but prefers pull(). Switches between pull() & try_pull() if it gets an exception. Only gives up when both methods have returned two consecutive exceptions.

Note, our own implementation of ProxyPullSupplier::pull() is very basic.

Definition at line 76 of file ProxyPullConsumer.h.


Member Enumeration Documentation

enum OmniEvents::ProxyPullConsumer_i::Mode [private]
 

This proxy can call out in either pull() or try_pull() mode.

Enumeration values:
Pull 
TryPull 

Definition at line 93 of file ProxyPullConsumer.h.


Constructor & Destructor Documentation

OmniEvents::ProxyPullConsumer_i::ProxyPullConsumer_i PortableServer::POA_ptr    poa,
list< CORBA::Any * > &    q
 

Definition at line 130 of file ProxyPullConsumer.cc.

References _exceptionCount, Pull, and TryPull.


Member Function Documentation

void OmniEvents::ProxyPullConsumer_i::connect_pull_supplier CosEventComm::PullSupplier_ptr    pullSupplier
 

Definition at line 86 of file ProxyPullConsumer.cc.

References OmniEvents::Proxy::_req, _target, and OmniEvents::Servant::deactivateObject().

Referenced by reincarnate().

void OmniEvents::ProxyPullConsumer_i::disconnect_pull_consumer  
 

Definition at line 108 of file ProxyPullConsumer.cc.

References _target, DB, and OmniEvents::Servant::deactivateObject().

void OmniEvents::ProxyPullConsumer_i::output ostream &    os [virtual]
 

Save this object's state to a stream.

Implements OmniEvents::Proxy.

Definition at line 240 of file ProxyPullConsumer.cc.

References _target, and OmniEvents::Servant::basicOutput().

void OmniEvents::ProxyPullConsumer_i::reincarnate const OEP_prxy   prxy [virtual]
 

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

Implements OmniEvents::Proxy.

Definition at line 231 of file ProxyPullConsumer.cc.

References OmniEvents::Servant::activateObjectWithId(), connect_pull_supplier(), OEP_prxy::getIor(), and OEP_prxy::getKey().

void OmniEvents::ProxyPullConsumer_i::trigger  
 

Definition at line 142 of file ProxyPullConsumer.cc.

References _exceptionCount, _queue, OmniEvents::Proxy::_req, _target, DB, OmniEvents::Servant::deactivateObject(), Pull, and TryPull.

Referenced by OmniEvents::ProxyPullConsumerManager::trigger().


Member Data Documentation

int OmniEvents::ProxyPullConsumer_i::_exceptionCount[2] [private]
 

Only when two consecutive exceptions have been received from each mode, do we consider the connection dead.

Definition at line 98 of file ProxyPullConsumer.h.

Referenced by ProxyPullConsumer_i(), and trigger().

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

Definition at line 90 of file ProxyPullConsumer.h.

Referenced by trigger().

CosEventComm::PullSupplier_var OmniEvents::ProxyPullConsumer_i::_target [private]
 

Definition at line 89 of file ProxyPullConsumer.h.

Referenced by connect_pull_supplier(), disconnect_pull_consumer(), output(), and trigger().


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