#include <ProxyPushConsumer.h>
Inheritance diagram for TAO_Notify_ProxyPushConsumer:
Public Member Functions | |
TAO_Notify_ProxyPushConsumer (void) | |
Constructor. | |
virtual | ~TAO_Notify_ProxyPushConsumer () |
Destructor. | |
virtual const char * | get_proxy_type_name (void) const |
virtual void | load_attrs (const TAO_Notify::NVPList &attrs) |
Protected Member Functions | |
virtual CosNotifyChannelAdmin::ProxyType | MyType (void) |
= CosNotifyChannelAdmin::ProxyPushConsumer methods | |
virtual void | push (const CORBA::Any &data) |
virtual void | connect_any_push_supplier (CosEventComm::PushSupplier_ptr push_supplier) |
virtual void | disconnect_push_consumer (void) |
Private Types | |
typedef TAO_Notify_ProxyConsumer_T< POA_CosNotifyChannelAdmin::ProxyPushConsumer > | SuperClass |
Private Member Functions | |
virtual void | release (void) |
Release. | |
Friends | |
class | TAO_Notify_Builder |
Definition at line 39 of file ProxyPushConsumer.h.
typedef TAO_Notify_ProxyConsumer_T<POA_CosNotifyChannelAdmin::ProxyPushConsumer> TAO_Notify_ProxyPushConsumer::SuperClass [private] |
Definition at line 44 of file ProxyPushConsumer.h.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_ProxyPushConsumer::TAO_Notify_ProxyPushConsumer | ( | void | ) |
TAO_Notify_ProxyPushConsumer::~TAO_Notify_ProxyPushConsumer | ( | ) | [virtual] |
void TAO_Notify_ProxyPushConsumer::connect_any_push_supplier | ( | CosEventComm::PushSupplier_ptr | push_supplier | ) | [protected, virtual] |
Definition at line 54 of file ProxyPushConsumer.cpp.
References ACE_NEW_THROW_EX, TAO_Notify_ProxyConsumer::connect(), TAO_Notify::Topology_Object::self_change(), and TAO_Notify_ProxyConsumer::supplier().
Referenced by load_attrs().
00055 { 00056 // Convert Supplier to Base Type 00057 TAO_Notify_PushSupplier *supplier; 00058 ACE_NEW_THROW_EX (supplier, 00059 TAO_Notify_PushSupplier (this), 00060 CORBA::NO_MEMORY ()); 00061 00062 supplier->init (push_supplier); 00063 00064 this->connect (supplier); 00065 this->self_change (); 00066 }
void TAO_Notify_ProxyPushConsumer::disconnect_push_consumer | ( | void | ) | [protected, virtual] |
Definition at line 68 of file ProxyPushConsumer.cpp.
References TAO_Notify_ProxyConsumer::destroy(), and TAO_Notify::Topology_Object::self_change().
00069 { 00070 TAO_Notify_ProxyPushConsumer::Ptr guard( this ); 00071 this->destroy (); 00072 this->self_change (); 00073 }
const char * TAO_Notify_ProxyPushConsumer::get_proxy_type_name | ( | void | ) | const [virtual] |
void TAO_Notify_ProxyPushConsumer::load_attrs | ( | const TAO_Notify::NVPList & | attrs | ) | [virtual] |
Load our attributes. Each derived type should call the superclass load first before loading its own attributes.
Reimplemented from TAO_Notify_Object.
Definition at line 82 of file ProxyPushConsumer.cpp.
References ACE_ASSERT, ACE_String_Base< CHAR >::c_str(), connect_any_push_supplier(), TAO_Notify_Properties::instance(), ACE_String_Base< CHAR >::length(), TAO_Notify::NVPList::load(), TAO_Notify_Object::load_attrs(), TAO_Notify_Properties::orb(), and TAO_Notify_Proxy::updates_off_.
00083 { 00084 SuperClass::load_attrs(attrs); 00085 ACE_CString ior; 00086 if (attrs.load("PeerIOR", ior)) 00087 { 00088 CORBA::ORB_var orb = TAO_Notify_PROPERTIES::instance()->orb(); 00089 try 00090 { 00091 CosNotifyComm::PushSupplier_var ps = CosNotifyComm::PushSupplier::_nil(); 00092 if ( ior.length() > 0 ) 00093 { 00094 CORBA::Object_var obj = 00095 orb->string_to_object(ior.c_str()); 00096 ps = CosNotifyComm::PushSupplier::_unchecked_narrow(obj.in()); 00097 } 00098 // minor hack: suppress generating subscription updates during reload. 00099 bool save_updates = this->updates_off_; 00100 this->updates_off_ = true; 00101 this->connect_any_push_supplier(ps.in()); 00102 this->updates_off_ = save_updates; 00103 } 00104 catch (...) 00105 { 00106 ACE_ASSERT(0); 00107 } 00108 } 00109 }
CosNotifyChannelAdmin::ProxyType TAO_Notify_ProxyPushConsumer::MyType | ( | void | ) | [protected, virtual] |
= CosNotifyChannelAdmin::ProxyPushConsumer methods
Definition at line 31 of file ProxyPushConsumer.cpp.
References CosNotifyChannelAdmin::PUSH_ANY.
00032 { 00033 return CosNotifyChannelAdmin::PUSH_ANY; 00034 }
void TAO_Notify_ProxyPushConsumer::push | ( | const CORBA::Any & | data | ) | [protected, virtual] |
Definition at line 37 of file ProxyPushConsumer.cpp.
References TAO_Notify_Object::admin_properties(), TAO_Notify_ProxyConsumer::push_i(), and TAO_Notify_AdminProperties::queue_full().
00038 { 00039 // Check if we should proceed at all. 00040 if (this->admin_properties().reject_new_events () == 1 00041 && this->admin_properties().queue_full ()) 00042 throw CORBA::IMP_LIMIT (); 00043 00044 if (this->is_connected () == 0) 00045 { 00046 throw CosEventComm::Disconnected (); 00047 } 00048 00049 TAO_Notify_AnyEvent_No_Copy event (any); 00050 this->push_i (&event); 00051 }
void TAO_Notify_ProxyPushConsumer::release | ( | void | ) | [private, virtual] |
friend class TAO_Notify_Builder [friend] |