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 Member Functions

void connect_pull_supplier (CosEventComm::PullSupplier_ptr pullSupplier)
void disconnect_pull_consumer ()
 ProxyPullConsumer_i (PortableServer::POA_ptr poa, list< CORBA::Any * > &q)
 ~ProxyPullConsumer_i ()
void collect ()
 Collects responses since the last trigger.
void triggerRequest ()
 When _req is NIL, sends out a new pull() or try_pull() call.
void reincarnate (const string &oid, const PersistNode &node)
 Re-create a servant from information saved in the log file.
void output (ostream &os)
 Save this object's state to a stream.

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
Mode _mode
int _exceptionCount
 Only when two consecutive exceptions have been received from each mode, do we consider the connection dead.

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 100 of file ProxyPullConsumer.h.


Member Enumeration Documentation

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

Enumerator:
Pull 
TryPull 

Definition at line 123 of file ProxyPullConsumer.h.


Constructor & Destructor Documentation

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

Definition at line 149 of file ProxyPullConsumer.cc.

OmniEvents::ProxyPullConsumer_i::~ProxyPullConsumer_i (  ) 

Definition at line 160 of file ProxyPullConsumer.cc.


Member Function Documentation

void OmniEvents::ProxyPullConsumer_i::collect (  ) 

Collects responses since the last trigger.

Definition at line 165 of file ProxyPullConsumer.cc.

References DB.

void OmniEvents::ProxyPullConsumer_i::connect_pull_supplier ( CosEventComm::PullSupplier_ptr  pullSupplier  ) 
void OmniEvents::ProxyPullConsumer_i::disconnect_pull_consumer (  ) 

Definition at line 126 of file ProxyPullConsumer.cc.

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

Save this object's state to a stream.

Implements OmniEvents::Proxy.

Definition at line 269 of file ProxyPullConsumer.cc.

void OmniEvents::ProxyPullConsumer_i::reincarnate ( const string &  oid,
const PersistNode node 
) [virtual]

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

Implements OmniEvents::Proxy.

Definition at line 257 of file ProxyPullConsumer.cc.

void OmniEvents::ProxyPullConsumer_i::triggerRequest (  ) 

When _req is NIL, sends out a new pull() or try_pull() call.

Definition at line 236 of file ProxyPullConsumer.cc.


Member Data Documentation

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

Definition at line 129 of file ProxyPullConsumer.h.

Definition at line 124 of file ProxyPullConsumer.h.

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

Definition at line 120 of file ProxyPullConsumer.h.

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

Definition at line 119 of file ProxyPullConsumer.h.

Referenced by connect_pull_supplier().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2