OmniEvents
OmniEvents::ProxyPullSupplier_i Class Reference

Servant for ProxyPullSupplier interface. More...

#include <ProxyPullSupplier.h>

Inheritance diagram for OmniEvents::ProxyPullSupplier_i:
Collaboration diagram for OmniEvents::ProxyPullSupplier_i:

Public Member Functions

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
 
- Public Member Functions inherited from OmniEvents::Proxy
virtual ~Proxy ()
 
- Public Member Functions inherited from OmniEvents::Servant
virtual PortableServer::POA_ptr _default_POA ()
 
virtual ~Servant ()
 
- Public Member Functions inherited from OmniEvents::EventQueue::Reader
 Reader (EventQueue &eventQueue)
 
bool moreEvents () const
 
CORBA::Any * nextEvent ()
 

Private Member Functions

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

Private Attributes

CosEventComm::PullConsumer_var _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...
 

Additional Inherited Members

- Protected Member Functions inherited from OmniEvents::Proxy
 Proxy (PortableServer::POA_ptr poa)
 
void keyOutput (ostream &os, const char *name)
 Helper method for constructing persistency output. More...
 
void eraseKey (const char *name)
 Helper method for constructing persistency output. More...
 
void basicOutput (ostream &os, const char *name, CORBA::Object_ptr target=CORBA::Object::_nil(), const char *extraAttributes=NULL)
 Helper method for constructing persistency output. More...
 
- Protected Member Functions inherited from OmniEvents::Servant
 Servant (PortableServer::POA_ptr poa)
 
void activateObjectWithId (const char *oidStr)
 Calls activate_object_with_id() to activate this servant in its POA. More...
 
void deactivateObject ()
 Calls deactivate_object() to deactivate this servant in its POA. More...
 
- Protected Attributes inherited from OmniEvents::Proxy
CORBA::Request_var _req
 
- Protected Attributes inherited from OmniEvents::Servant
PortableServer::POA_var _poa
 

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 84 of file ProxyPullSupplier.h.

Constructor & Destructor Documentation

◆ ProxyPullSupplier_i()

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

Definition at line 183 of file ProxyPullSupplier.cc.

References touch().

◆ ~ProxyPullSupplier_i()

OmniEvents::ProxyPullSupplier_i::~ProxyPullSupplier_i ( )

Definition at line 196 of file ProxyPullSupplier.cc.

References DB.

Member Function Documentation

◆ connect_pull_consumer()

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

◆ disconnect_pull_supplier()

◆ output()

void OmniEvents::ProxyPullSupplier_i::output ( ostream &  os)
virtual

Save this object's state to a stream.

Implements OmniEvents::Proxy.

Definition at line 213 of file ProxyPullSupplier.cc.

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

Referenced by connect_pull_consumer().

◆ pull()

CORBA::Any * OmniEvents::ProxyPullSupplier_i::pull ( )

◆ reincarnate()

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 201 of file ProxyPullSupplier.cc.

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

◆ timestamp()

unsigned long OmniEvents::ProxyPullSupplier_i::timestamp ( ) const
inline

Definition at line 99 of file ProxyPullSupplier.h.

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

◆ touch()

void OmniEvents::ProxyPullSupplier_i::touch ( )
inlineprivate

Update the _timestamp to the current moment.

Definition at line 218 of file ProxyPullSupplier.cc.

References _timestamp.

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

◆ try_pull()

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

Member Data Documentation

◆ _connected

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 106 of file ProxyPullSupplier.h.

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

◆ _target

CosEventComm::PullConsumer_var OmniEvents::ProxyPullSupplier_i::_target
private

Definition at line 101 of file ProxyPullSupplier.h.

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

◆ _timestamp

unsigned long OmniEvents::ProxyPullSupplier_i::_timestamp
private

Keep track of when this proxy was last contacted.

Definition at line 108 of file ProxyPullSupplier.h.

Referenced by touch().


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