#include <Proxy.h>
Inheritance diagram for TAO_Notify_Proxy:
Public Types | |
typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Proxy > | Ptr |
typedef CosNotifyChannelAdmin::ProxyIDSeq | SEQ |
typedef CosNotifyChannelAdmin::ProxyIDSeq_var | SEQ_VAR |
Public Member Functions | |
TAO_Notify_Proxy (void) | |
Constuctor. | |
virtual | ~TAO_Notify_Proxy () |
Destructor. | |
virtual CORBA::Object_ptr | activate (PortableServer::Servant servant) |
Activate. | |
virtual CORBA::Object_ptr | activate (PortableServer::Servant servant, CORBA::Long id) |
Activate with a given ID. | |
void | deactivate () |
Deactivate. | |
void | subscribed_types (TAO_Notify_EventTypeSeq &subscribed_types) |
Obtain the Proxy's subscribed types. | |
CORBA::Boolean | check_filters (const TAO_Notify_Event *event, TAO_Notify_FilterAdmin &parent_filter_admin, CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator) |
Check if this event passes the admin and proxy filters. | |
void | types_changed (const TAO_Notify_EventTypeSeq &added, const TAO_Notify_EventTypeSeq &removed) |
Inform this proxy that the following types are being advertised. | |
CORBA::Boolean | updates_off (void) |
Have updates been turned off. | |
virtual void | destroy ()=0 |
Destroy this object. | |
virtual TAO_Notify_Peer * | peer (void)=0 |
Access our Peer. | |
virtual CosNotification::EventTypeSeq * | obtain_types (CosNotifyChannelAdmin::ObtainInfoMode mode, const TAO_Notify_EventTypeSeq &types) throw (CORBA::SystemException) |
Implement the Obtain Types. | |
virtual void | admin_types_changed (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed)=0 |
Notification of subscriptions/offers set at the admin. | |
virtual void | qos_changed (const TAO_Notify_QoSProperties &qos_properties) |
Override, TAO_Notify_Object::qos_changed. | |
virtual void | save_persistent (TAO_Notify::Topology_Saver &saver) |
virtual void | save_attrs (TAO_Notify::NVPList &attrs) |
virtual const char * | get_proxy_type_name (void) const=0 |
virtual TAO_Notify::Topology_Object * | load_child (const ACE_CString &type, CORBA::Long id, const TAO_Notify::NVPList &attrs) |
Protected Attributes | |
TAO_Notify_FilterAdmin | filter_admin_ |
Filter Administration. | |
TAO_Notify_EventTypeSeq | subscribed_types_ |
The types that we're subscribed with the event manager. | |
CORBA::Boolean | updates_off_ |
True if updates have been turned off. | |
Friends | |
class | TAO_Notify_Peer |
Definition at line 38 of file Proxy.h.
|
Reimplemented from TAO_Notify_Refcountable. Reimplemented in TAO_Notify_ProxyConsumer, and TAO_Notify_ProxySupplier. |
|
|
|
|
|
Constuctor.
Definition at line 21 of file Proxy.cpp.
00022 : updates_off_ (0) 00023 { 00024 } |
|
Destructor.
Definition at line 26 of file Proxy.cpp.
00027 { 00028 } |
|
Activate with a given ID.
Reimplemented from TAO_Notify_Object. Reimplemented in TAO_Notify_RT_StructuredProxyPushSupplier. Definition at line 39 of file Proxy.cpp. References ACE_ENV_ARG_PARAMETER, TAO_Notify_Object::activate(), and TAO_Notify_Object::set_primary_as_proxy_poa().
00042 { 00043 // Set the POA that we use to return our <ref> 00044 this->set_primary_as_proxy_poa(); 00045 return TAO_Notify_Object::activate (servant, id ACE_ENV_ARG_PARAMETER); 00046 } |
|
Activate.
Reimplemented from TAO_Notify_Object. Reimplemented in TAO_Notify_RT_StructuredProxyPushSupplier. Definition at line 31 of file Proxy.cpp. References ACE_ENV_ARG_PARAMETER, TAO_Notify_Object::activate(), and TAO_Notify_Object::set_primary_as_proxy_poa(). Referenced by TAO_Notify_RT_StructuredProxyPushSupplier::activate().
00032 { 00033 // Set the POA that we use to return our <ref> 00034 this->set_primary_as_proxy_poa(); 00035 return TAO_Notify_Object::activate (servant ACE_ENV_ARG_PARAMETER); 00036 } |
|
|
Check if this event passes the admin and proxy filters.
Definition at line 14 of file Proxy.inl. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and TAO_Notify_FilterAdmin::match(). Referenced by TAO_Notify_Method_Request_Lookup::execute_i().
00018 { 00019 // check if it passes the parent filter. 00020 CORBA::Boolean parent_val = 00021 parent_filter_admin.match (event ACE_ENV_ARG_PARAMETER); 00022 ACE_CHECK_RETURN (0); 00023 00024 CORBA::Boolean val = 0; 00025 00026 if (filter_operator == CosNotifyChannelAdmin::AND_OP) 00027 { 00028 val = parent_val && this->filter_admin_.match (event ACE_ENV_ARG_PARAMETER); 00029 ACE_CHECK_RETURN (0); 00030 } 00031 else 00032 { 00033 val = parent_val || this->filter_admin_.match (event ACE_ENV_ARG_PARAMETER); 00034 ACE_CHECK_RETURN (0); 00035 } 00036 00037 return val; 00038 } |
|
Deactivate.
Reimplemented from TAO_Notify_Object. Definition at line 49 of file Proxy.cpp. References ACE_ASSERT, ACE_ENV_ARG_PARAMETER, TAO_Notify_POA_Helper::deactivate(), and TAO_Notify_Object::proxy_poa().
00050 { 00051 ACE_ASSERT (this->proxy_poa() != 0 ); 00052 this->proxy_poa()->deactivate (this->id() ACE_ENV_ARG_PARAMETER); 00053 } |
|
Destroy this object.
Implemented in TAO_Notify_ProxyConsumer, and TAO_Notify_ProxySupplier. Referenced by TAO_Notify_Peer::handle_dispatch_exception(). |
|
|
Definition at line 178 of file Proxy.cpp. References ACE_CHECK_RETURN, and ACE_Unbounded_Set< TAO_Notify_EventType >::reset().
00180 { 00181 ACE_UNUSED_ARG (id); 00182 ACE_UNUSED_ARG (attrs); 00183 TAO_Notify::Topology_Object* result = this; 00184 if (type == "subscriptions") 00185 { 00186 // since we initialized our subscribed types to everything 00187 // in the constructor. we have to clear it out first. 00188 this->subscribed_types_.reset(); 00189 result = &this->subscribed_types_; 00190 ACE_CHECK_RETURN(0); 00191 } 00192 else if (type == "filter_admin") 00193 { 00194 result = & this->filter_admin_; 00195 } 00196 return result; 00197 } |
|
Implement the Obtain Types.
Definition at line 89 of file Proxy.cpp. References ACE_CHECK_RETURN, ACE_GUARD_THROW_EX, ACE_NEW_THROW_EX, CosNotification::EventTypeSeq, and TAO_SYNCH_MUTEX.
00093 { 00094 CosNotification::EventTypeSeq_var event_type_seq; 00095 00096 ACE_NEW_THROW_EX (event_type_seq, 00097 CosNotification::EventTypeSeq (), 00098 CORBA::NO_MEMORY ()); 00099 00100 ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_, CORBA::INTERNAL ()); 00101 ACE_CHECK_RETURN (event_type_seq._retn ()); 00102 00103 if (mode == CosNotifyChannelAdmin::ALL_NOW_UPDATES_OFF || 00104 mode == CosNotifyChannelAdmin::ALL_NOW_UPDATES_ON) 00105 { 00106 types.populate (event_type_seq); 00107 } 00108 00109 if (mode == CosNotifyChannelAdmin::NONE_NOW_UPDATES_ON || 00110 mode == CosNotifyChannelAdmin::ALL_NOW_UPDATES_ON) 00111 { 00112 this->updates_off_ = 0; 00113 } 00114 else 00115 { 00116 this->updates_off_ = 1; 00117 } 00118 00119 return event_type_seq._retn (); 00120 } |
|
Access our Peer.
Implemented in TAO_Notify_ProxyConsumer, and TAO_Notify_ProxySupplier. Referenced by qos_changed(), and save_attrs(). |
|
Override, TAO_Notify_Object::qos_changed.
Reimplemented from TAO_Notify_Object. Reimplemented in TAO_Notify_ProxySupplier. Definition at line 123 of file Proxy.cpp. References peer(), and TAO_Notify_Peer::qos_changed(). Referenced by TAO_Notify_ProxySupplier::qos_changed().
00124 { 00125 //Inform Peers of qos changes. 00126 TAO_Notify_Peer* peer = this->peer (); 00127 00128 if (peer != 0) 00129 peer->qos_changed (qos_properties); 00130 } |
|
Called by derived types to save their attributes. Each derived type should call its superclass version before saving its own attrs. Reimplemented from TAO_Notify_Object. Definition at line 167 of file Proxy.cpp. References TAO_Notify_Peer::get_ior(), peer(), TAO_Notify::NVPList::push_back(), and TAO_Notify_Object::save_attrs(). Referenced by save_persistent().
00168 { 00169 TAO_Notify_Object::save_attrs(attrs); 00170 TAO_Notify_Peer * peer = this->peer(); 00171 if (peer != 0) 00172 { 00173 attrs.push_back (TAO_Notify::NVP("PeerIOR", peer->get_ior())); 00174 } 00175 } |
|
Save our state to a Topology_Saver. Use the methods of a Topology_Saver to store all information we want persisted. This function is called by our parent, which gives us a saver to use. In turn, we must call this function on all of our children. The implementation should look like: bool change = this->self_changed_; this->self_changed_ = false; this->children_changed_ = false; if (is_persistent ()) { bool want_all_children = saver.begin_object( this->id(), type, attrs, change ACE_ENV_ARG_PARAMETER); ACE_CHECK; for all children { if (want_all_children || child.is_changed()) { child.save_persistent(saver ACE_ENV_ARG_PARAMETER); ACE_CHECK; } } for all deleted children { saver.delete_child(child_type, child_id); } saver.end_object(this->id(), type ACE_ENV_ARG_PARAMETER); ) Implements TAO_Notify::Topology_Savable. Definition at line 133 of file Proxy.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, get_proxy_type_name(), TAO_Notify::Topology_Object::is_changed(), TAO_Notify::Topology_Object::is_persistent(), save_attrs(), TAO_Notify_EventTypeSeq::save_persistent(), and TAO_Notify_FilterAdmin::save_persistent().
00134 { 00135 bool changed = this->children_changed_; 00136 this->children_changed_ = false; 00137 this->self_changed_ = false; 00138 00139 if (is_persistent ()) 00140 { 00141 TAO_Notify::NVPList attrs; 00142 this->save_attrs(attrs); 00143 00144 const char * type_name = this->get_proxy_type_name (); 00145 bool want_all_children = saver.begin_object(this->id(), type_name, attrs, changed ACE_ENV_ARG_PARAMETER); 00146 ACE_CHECK; 00147 00148 if (want_all_children || this->filter_admin_.is_changed ()) 00149 { 00150 this->filter_admin_.save_persistent(saver ACE_ENV_ARG_PARAMETER); 00151 ACE_CHECK; 00152 } 00153 00154 if (want_all_children || this->subscribed_types_.is_changed ()) 00155 { 00156 this->subscribed_types_.save_persistent(saver ACE_ENV_ARG_PARAMETER); 00157 ACE_CHECK; 00158 } 00159 00160 // todo: handle removed children 00161 00162 saver.end_object(this->id(), type_name ACE_ENV_ARG_PARAMETER); 00163 } 00164 } |
|
Obtain the Proxy's subscribed types.
Definition at line 56 of file Proxy.cpp. References ACE_CHECK, ACE_GUARD_THROW_EX, and TAO_SYNCH_MUTEX. Referenced by TAO_Notify_Peer::dispatch_updates().
00057 { 00058 ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 00059 CORBA::INTERNAL ()); 00060 ACE_CHECK; 00061 00062 // copy 00063 subscribed_types = this->subscribed_types_; 00064 } |
|
Inform this proxy that the following types are being advertised.
Definition at line 67 of file Proxy.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_Notify_Method_Request_Updates_No_Copy::execute(), TAO_Notify_Object::execute_task(), TAO_Singleton< TYPE, ACE_LOCK >::instance(), and updates_off_.
00068 { 00069 // return if the updates for this proxy are turned off or 00070 // if all the updates in the channel are switched off. 00071 if (this->updates_off_ == 1 || TAO_Notify_PROPERTIES::instance()->updates () == 0) 00072 return; 00073 00074 TAO_Notify_Method_Request_Updates_No_Copy request (added, removed, this); 00075 00076 if (TAO_Notify_PROPERTIES::instance()->asynch_updates () == 1) // if we should send the updates synchronously. 00077 { 00078 this->execute_task (request ACE_ENV_ARG_PARAMETER); 00079 ACE_CHECK; 00080 } 00081 else // execute in the current thread context. 00082 { 00083 request.execute (ACE_ENV_SINGLE_ARG_PARAMETER); 00084 ACE_CHECK; 00085 } 00086 } |
|
Have updates been turned off.
Definition at line 8 of file Proxy.inl. References updates_off_.
00009 { 00010 return this->updates_off_; 00011 } |
|
|
|
Filter Administration.
|
|
The types that we're subscribed with the event manager.
|
|
True if updates have been turned off.
Definition at line 128 of file Proxy.h. Referenced by types_changed(), and updates_off(). |