32 #define MILLION 1000000
33 #define BILLION 1000000000
37 CosEventChannelAdmin::ProxyPushConsumer_ptr
44 CosEventChannelAdmin::ProxyPullConsumer_ptr
55 PortableServer::POA_ptr poa
85 DB(20,
"~SupplierAdmin_i()")
96 for(list<CORBA::Any*>::iterator i=
_queue.begin(); i!=
_queue.end(); ++i)
109 if(0==_nextPull.first)
111 _pullConsumer->triggerRequest();
115 pair<unsigned long,unsigned long> now;
116 omni_thread::get_time(&(now.first),&(now.second));
119 _pullConsumer->triggerRequest();
121 CORBA::ULong p =_channel.pullRetryPeriod_ms();
123 _nextPull.second += (p%1000)*
MILLION;
124 _nextPull.first += p/1000 + _nextPull.second/
BILLION;
126 }
while(now>=_nextPull);
130 _pushConsumer->trigger();
150 if(pushcNode && !pushcNode->
_child.empty())
158 if(pullcNode && !pullcNode->
_child.empty())
#define OMNIEVENTS__DEBUG_REF_COUNTS__DEFN(C)
Defines debug versions of _add/remove_ref() for class C.
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
ConsumerAdmin_i & consumerAdmin() const
CORBA::ULong pullRetryPeriod_ms() const
unsigned long cyclePeriod_ns() const
map< string, PersistNode * > _child
PersistNode * child(const string &key) const
void reincarnate(const PersistNode &node)
Re-create servants from information saved in the log file.
void output(ostream &os)
Save this object's state to a stream.
void disconnect()
Send disconnect_pull_supplier() to all connected PullSuppliers.
OMNIEVENTS__DEBUG_REF_COUNTS__DECL CosEventChannelAdmin::ProxyPullConsumer_ptr createObject()
Default servant for ProxyPushConsumer objects.
void output(ostream &os) const
Save this object's state to a stream.
CosEventChannelAdmin::ProxyPushConsumer_ptr createObject()
Constructs a new object.
void reincarnate(const PersistNode &node)
Re-create all servants from information saved in the log file.
void disconnect()
Send disconnect_push_supplier() to all connected PushSuppliers.
PortableServer::POA_var _poa
void activateObjectWithId(const char *oidStr)
Calls activate_object_with_id() to activate this servant in its POA.
list< CORBA::Any * > _queue
Incoming queue for the PushConsumer.
pair< unsigned long, unsigned long > _nextPull
Next time to retry pull (sec,nsec).
CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer()
SupplierAdmin_i(const EventChannel_i &channel, PortableServer::POA_ptr poa)
const EventChannel_i & _channel
void disconnect()
Send disconnect_XXX_supplier() to all connected consumers.
void output(ostream &os)
Save this object's state to a stream.
virtual ~SupplierAdmin_i()
ProxyPushConsumer_i * _pushConsumer
ProxyPullConsumerManager * _pullConsumer
OMNIEVENTS__DEBUG_REF_COUNTS__DECL void collect(list< CORBA::Any * > &events)
Collects all events that have arrived since the last call.
void reincarnate(const PersistNode &node)
Populate this servant from log information.
CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer()