#include <SequenceProxyPushConsumer.h>
Public Member Functions | |
TAO_Notify_SequenceProxyPushConsumer (void) | |
Constructor. | |
virtual | ~TAO_Notify_SequenceProxyPushConsumer () |
Destructor. | |
virtual const char * | get_proxy_type_name (void) const |
virtual void | load_attrs (const TAO_Notify::NVPList &attrs) |
virtual void | validate () |
virtual void | configure (TAO_Notify_SupplierAdmin &admin, CosNotifyChannelAdmin::ProxyID_out proxy_id) |
Protected Member Functions | |
virtual CosNotifyChannelAdmin::ProxyType | MyType (void) |
= Protected Methods | |
virtual void | connect_sequence_push_supplier (CosNotifyComm::SequencePushSupplier_ptr push_supplier) |
virtual void | push_structured_events (const CosNotification::EventBatch ¬ifications) |
virtual void | disconnect_sequence_push_consumer (void) |
Protected Attributes | |
TAO_Notify_Property_Time | pacing_interval_ |
= Data Members | |
Private Types | |
typedef TAO_Notify_ProxyConsumer_T < POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer > | SuperClass |
Private Member Functions | |
virtual void | release (void) |
TAO_Notify_Destroy_Callback methods. | |
Friends | |
class | TAO_Notify_Builder |
Definition at line 40 of file SequenceProxyPushConsumer.h.
typedef TAO_Notify_ProxyConsumer_T<POA_CosNotifyChannelAdmin::SequenceProxyPushConsumer> TAO_Notify_SequenceProxyPushConsumer::SuperClass [private] |
Definition at line 43 of file SequenceProxyPushConsumer.h.
TAO_Notify_SequenceProxyPushConsumer::TAO_Notify_SequenceProxyPushConsumer | ( | void | ) |
Constructor.
Definition at line 15 of file SequenceProxyPushConsumer.cpp.
TAO_Notify_SequenceProxyPushConsumer::~TAO_Notify_SequenceProxyPushConsumer | ( | ) | [virtual] |
void TAO_Notify_SequenceProxyPushConsumer::configure | ( | TAO_Notify_SupplierAdmin & | admin, | |
CosNotifyChannelAdmin::ProxyID_out | proxy_id | |||
) | [virtual] |
Definition at line 134 of file SequenceProxyPushConsumer.cpp.
{ // Nothing to do. // This virtual method was added to support Notification MC }
void TAO_Notify_SequenceProxyPushConsumer::connect_sequence_push_supplier | ( | CosNotifyComm::SequencePushSupplier_ptr | push_supplier | ) | [protected, virtual] |
Definition at line 38 of file SequenceProxyPushConsumer.cpp.
{ // Convert Supplier to Base Type TAO_Notify_SequencePushSupplier *supplier; ACE_NEW_THROW_EX (supplier, TAO_Notify_SequencePushSupplier (this), CORBA::NO_MEMORY ()); supplier->init (push_supplier); this->connect (supplier); this->self_change (); }
void TAO_Notify_SequenceProxyPushConsumer::disconnect_sequence_push_consumer | ( | void | ) | [protected, virtual] |
Definition at line 74 of file SequenceProxyPushConsumer.cpp.
{ TAO_Notify_SequenceProxyPushConsumer::Ptr guard( this ); this->destroy (); this->self_change (); }
const char * TAO_Notify_SequenceProxyPushConsumer::get_proxy_type_name | ( | void | ) | const [virtual] |
Implements TAO_Notify_Proxy.
Definition at line 82 of file SequenceProxyPushConsumer.cpp.
{ return "sequence_proxy_push_consumer"; }
void TAO_Notify_SequenceProxyPushConsumer::load_attrs | ( | const TAO_Notify::NVPList & | attrs | ) | [virtual] |
Definition at line 105 of file SequenceProxyPushConsumer.cpp.
{ SuperClass::load_attrs(attrs); ACE_CString ior; if (attrs.load("PeerIOR", ior)) { CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb(); try { CosNotifyComm::SequencePushSupplier_var ps = CosNotifyComm::SequencePushSupplier::_nil(); if ( ior.length() > 0 ) { CORBA::Object_var obj = orb->string_to_object(ior.c_str()); ps = CosNotifyComm::SequencePushSupplier::_unchecked_narrow(obj.in()); } // minor hack: suppress generating subscription updates during reload. bool save_updates = this->updates_off_; this->updates_off_ = true; this->connect_sequence_push_supplier(ps.in()); this->updates_off_ = save_updates; } catch (const CORBA::Exception&) { ACE_ASSERT(0); } } }
CosNotifyChannelAdmin::ProxyType TAO_Notify_SequenceProxyPushConsumer::MyType | ( | void | ) | [protected, virtual] |
= Protected Methods
Definition at line 32 of file SequenceProxyPushConsumer.cpp.
{
return CosNotifyChannelAdmin::PUSH_SEQUENCE;
}
void TAO_Notify_SequenceProxyPushConsumer::push_structured_events | ( | const CosNotification::EventBatch & | notifications | ) | [protected, virtual] |
Definition at line 53 of file SequenceProxyPushConsumer.cpp.
{ // Check if we should proceed at all. if (this->admin_properties().reject_new_events () == 1 && this->admin_properties().queue_full ()) throw CORBA::IMP_LIMIT (); if (this->is_connected () == 0) { throw CosEventComm::Disconnected (); } for (CORBA::ULong i = 0; i < event_batch.length (); ++i) { const CosNotification::StructuredEvent& notification = event_batch[i]; TAO_Notify_StructuredEvent_No_Copy event (notification); this->push_i (&event); } }
void TAO_Notify_SequenceProxyPushConsumer::release | ( | void | ) | [private, virtual] |
TAO_Notify_Destroy_Callback methods.
Definition at line 25 of file SequenceProxyPushConsumer.cpp.
{ delete this; //@@ inform factory }
void TAO_Notify_SequenceProxyPushConsumer::validate | ( | ) | [virtual] |
Implements TAO_Notify_Proxy.
Definition at line 88 of file SequenceProxyPushConsumer.cpp.
{ TAO_Notify_Supplier* sup = this->supplier (); if (sup != 0 && ! sup->is_alive (true)) { if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Notify_SequenceProxyPushConsumer::validate(%d)") ACE_TEXT ("disconnecting \n"), this->id ())); } this->disconnect_sequence_push_consumer (); } }
friend class TAO_Notify_Builder [friend] |
Definition at line 44 of file SequenceProxyPushConsumer.h.
= Data Members
Definition at line 60 of file SequenceProxyPushConsumer.h.