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

OmniEvents::ProxyPullSupplier_i Class Reference

Servant for ProxyPullSupplier interface. More...

#include <ProxyPullSupplier.h>

Inheritance diagram for OmniEvents::ProxyPullSupplier_i:

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

Collaboration graph
[legend]
List of all members.

Public Methods

void connect_pull_consumer (CosEventComm::PullConsumer_ptr pullConsumer)
void disconnect_pull_supplier ()
CORBA::Any * pull ()
CORBA::Any * try_pull (CORBA::Boolean &has_event)
 ProxyPullSupplier_i (PortableServer::POA_ptr poa, EventQueue &q)
 ~ProxyPullSupplier_i ()
void reincarnate (const string &oid, const PersistNode &node)
 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...

unsigned long timestamp () const

Private Methods

void touch ()
 Update the _timestamp to the current moment. More...


Private Attributes

CosEventComm::PullConsumer::_var_type _target
bool _connected
 Can't use _target to keep track of whether this object is connected, because it is legal to connect with a nil target. More...

unsigned long _timestamp
 Keep track of when this proxy was last contacted. More...


Detailed Description

Servant for ProxyPullSupplier interface.

Does not properly implement the blocking pull() method - to do so would need us to create and park a thread for each waiting pull() method. Instead pull() throws TRANSIENT if the event queue is empty.

Definition at line 83 of file ProxyPullSupplier.h.


Constructor & Destructor Documentation

OmniEvents::ProxyPullSupplier_i::ProxyPullSupplier_i PortableServer::POA_ptr    poa,
EventQueue   q
 

Definition at line 173 of file ProxyPullSupplier.cc.

References touch().

OmniEvents::ProxyPullSupplier_i::~ProxyPullSupplier_i  
 

Definition at line 186 of file ProxyPullSupplier.cc.

References DB.


Member Function Documentation

void OmniEvents::ProxyPullSupplier_i::connect_pull_consumer CosEventComm::PullConsumer_ptr    pullConsumer
 

Definition at line 104 of file ProxyPullSupplier.cc.

References _connected, OmniEvents::Proxy::_req, _target, output(), and touch().

Referenced by reincarnate().

void OmniEvents::ProxyPullSupplier_i::disconnect_pull_supplier  
 

Definition at line 118 of file ProxyPullSupplier.cc.

References _connected, _target, DB, OmniEvents::Servant::deactivateObject(), OmniEvents::Proxy::eraseKey(), IFELSE_OMNIORB4, and touch().

Referenced by OmniEvents::ProxyPullSupplierManager::disconnect(), and OmniEvents::ProxyPullSupplierManager::incarnate().

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

Save this object's state to a stream.

Implements OmniEvents::Proxy.

Definition at line 203 of file ProxyPullSupplier.cc.

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

Referenced by connect_pull_consumer().

CORBA::Any * OmniEvents::ProxyPullSupplier_i::pull  
 

Definition at line 140 of file ProxyPullSupplier.cc.

References _connected, IFELSE_OMNIORB4, OmniEvents::EventQueue::Reader::moreEvents(), OmniEvents::EventQueue::Reader::nextEvent(), and touch().

void OmniEvents::ProxyPullSupplier_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 191 of file ProxyPullSupplier.cc.

References OmniEvents::Servant::activateObjectWithId(), OmniEvents::PersistNode::attrString(), and connect_pull_consumer().

unsigned long OmniEvents::ProxyPullSupplier_i::timestamp void    const [inline]
 

Definition at line 98 of file ProxyPullSupplier.h.

References _timestamp.

Referenced by OmniEvents::ProxyPullSupplierManager::incarnate().

void OmniEvents::ProxyPullSupplier_i::touch   [inline, private]
 

Update the _timestamp to the current moment.

Definition at line 208 of file ProxyPullSupplier.cc.

References _timestamp.

Referenced by connect_pull_consumer(), disconnect_pull_supplier(), ProxyPullSupplier_i(), pull(), and try_pull().

CORBA::Any * OmniEvents::ProxyPullSupplier_i::try_pull CORBA::Boolean &    has_event
 

Definition at line 154 of file ProxyPullSupplier.cc.

References _connected, OmniEvents::EventQueue::Reader::moreEvents(), OmniEvents::EventQueue::Reader::nextEvent(), and touch().


Member Data Documentation

bool OmniEvents::ProxyPullSupplier_i::_connected [private]
 

Can't use _target to keep track of whether this object is connected, because it is legal to connect with a nil target.

Use this bool instead.

Definition at line 105 of file ProxyPullSupplier.h.

Referenced by connect_pull_consumer(), disconnect_pull_supplier(), pull(), and try_pull().

CosEventComm::PullConsumer::_var_type OmniEvents::ProxyPullSupplier_i::_target [private]
 

Definition at line 100 of file ProxyPullSupplier.h.

Referenced by connect_pull_consumer(), disconnect_pull_supplier(), and output().

unsigned long OmniEvents::ProxyPullSupplier_i::_timestamp [private]
 

Keep track of when this proxy was last contacted.

Definition at line 107 of file ProxyPullSupplier.h.

Referenced by timestamp(), and touch().


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