#include <ProxyPushConsumer.h>
Inheritance diagram for TAO_Notify_ProxyPushConsumer:
Public Member Functions | |
TAO_Notify_ProxyPushConsumer (void) | |
Constuctor. | |
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 44 of file ProxyPushConsumer.h. |
|
Constuctor.
Definition at line 15 of file ProxyPushConsumer.cpp.
00016 { 00017 } |
|
Destructor.
Definition at line 19 of file ProxyPushConsumer.cpp.
00020 { 00021 } |
|
Definition at line 54 of file ProxyPushConsumer.cpp. References ACE_NEW_THROW_EX, TAO_Notify_ProxyConsumer::connect(), TAO_Notify_PushSupplier::init(), and TAO_Notify::Topology_Object::self_change(). 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 } |
|
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 } |
|
Implements TAO_Notify_Proxy. Definition at line 76 of file ProxyPushConsumer.cpp.
00077 { 00078 return "proxy_push_consumer"; 00079 } |
|
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_CString, connect_any_push_supplier(), TAO_Notify_Properties::instance(), TAO_Notify::NVPList::load(), and TAO_Notify_Properties::orb().
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::ProxyPushConsumer methods
Definition at line 31 of file ProxyPushConsumer.cpp.
00032 {
00033 return CosNotifyChannelAdmin::PUSH_ANY;
00034 }
|
|
Definition at line 37 of file ProxyPushConsumer.cpp. References TAO_Notify_Object::admin_properties(), TAO_Notify_ProxyConsumer::is_connected(), TAO_Notify_ProxyConsumer::push_i(), TAO_Notify_AdminProperties::queue_full(), and TAO_Notify_AdminProperties::reject_new_events().
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 } |
|
Release.
Implements TAO_Notify_Refcountable. Definition at line 24 of file ProxyPushConsumer.cpp.
00025 { 00026 delete this; 00027 //@@ inform factory 00028 } |
|
Reimplemented from TAO_Notify_Object. Definition at line 45 of file ProxyPushConsumer.h. |