#include <Method_Request_Lookup.h>
Inheritance diagram for TAO_Notify_Method_Request_Lookup:
Public Types | |
enum | { persistence_code = 2 } |
an arbitrary code (Octet) to identify this type of request in persistent storage More... | |
Public Member Functions | |
virtual | ~TAO_Notify_Method_Request_Lookup () |
Destructor. | |
Static Public Member Functions | |
TAO_Notify_Method_Request_Lookup_Queueable * | unmarshal (TAO_Notify::Delivery_Request_Ptr &delivery_request, TAO_Notify_EventChannelFactory &ecf, TAO_InputCDR &cdr) |
Static method used to reconstruct a Method Request Dispatch. | |
Protected Member Functions | |
TAO_Notify_Method_Request_Lookup (const TAO_Notify_Event *event, TAO_Notify_ProxyConsumer *proxy) | |
Constuctor. | |
int | execute_i () |
Execute the dispatch operation. | |
virtual void | work (TAO_Notify_ProxySupplier *proxy_supplier) |
= TAO_ESF_Worker method | |
Protected Attributes | |
TAO_Notify_ProxyConsumer * | proxy_consumer_ |
The Proxy. |
|
an arbitrary code (Octet) to identify this type of request in persistent storage
Definition at line 47 of file Method_Request_Lookup.h.
00047 {persistence_code = 2}; |
|
Destructor.
Definition at line 34 of file Method_Request_Lookup.cpp.
00035 { 00036 } |
|
Constuctor.
Definition at line 26 of file Method_Request_Lookup.cpp.
00029 : TAO_Notify_Method_Request_Event (event) 00030 , proxy_consumer_ (proxy) 00031 { 00032 } |
|
Execute the dispatch operation.
Definition at line 56 of file Method_Request_Lookup.cpp. References ACE_CHECK_RETURN, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, TAO_Notify_Proxy::check_filters(), TAO_Notify_Method_Request_Event::complete(), TAO_Notify_Event_Manager::consumer_map(), TAO_Notify_Object::event_manager(), TAO_Notify_Admin::filter_admin(), TAO_Notify_Admin::filter_operator(), TAO_ESF_Proxy_Collection< PROXY >::for_each(), TAO_Notify_Object::has_shutdown(), LM_DEBUG, proxy_consumer_, TAO_Notify_ProxyConsumer::supplier_admin(), TAO_debug_level, and TAO_Notify_ProxySupplier_Collection. Referenced by TAO_Notify_Method_Request_Lookup_No_Copy::execute(), and TAO_Notify_Method_Request_Lookup_Queueable::execute().
00057 { 00058 if (this->proxy_consumer_->has_shutdown ()) 00059 return 0; // If we were shutdown while waiting in the queue, return with no action. 00060 00061 TAO_Notify_SupplierAdmin& parent = this->proxy_consumer_->supplier_admin (); 00062 00063 CORBA::Boolean val = this->proxy_consumer_->check_filters (this->event_, 00064 parent.filter_admin (), 00065 parent.filter_operator () 00066 ACE_ENV_ARG_PARAMETER); 00067 ACE_CHECK_RETURN (0); 00068 00069 if (TAO_debug_level > 1) 00070 ACE_DEBUG ((LM_DEBUG, "Proxyconsumer %x filter eval result = %d",&this->proxy_consumer_ , val)); 00071 00072 // Filter failed - do nothing. 00073 if (val == 0) 00074 return 0; 00075 00076 // The map of subscriptions. 00077 TAO_Notify_Consumer_Map& map = this->proxy_consumer_->event_manager ().consumer_map (); 00078 00079 TAO_Notify_Consumer_Map::ENTRY* entry = map.find (this->event_->type () ACE_ENV_ARG_PARAMETER); 00080 ACE_CHECK_RETURN (0); 00081 00082 TAO_Notify_ProxySupplier_Collection* consumers = 0; 00083 00084 if (entry != 0) 00085 { 00086 consumers = entry->collection (); 00087 00088 if (consumers != 0) 00089 { 00090 consumers->for_each (this ACE_ENV_ARG_PARAMETER); 00091 ACE_CHECK_RETURN (0); 00092 } 00093 00094 map.release (entry); 00095 } 00096 00097 // Get the default consumers 00098 consumers = map.broadcast_collection (); 00099 00100 if (consumers != 0) 00101 { 00102 consumers->for_each (this ACE_ENV_ARG_PARAMETER); 00103 ACE_CHECK_RETURN (0); 00104 } 00105 this->complete (); 00106 return 0; 00107 } |
|
Static method used to reconstruct a Method Request Dispatch.
Definition at line 111 of file Method_Request_Lookup.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ERROR, ACE_NEW_NORETURN, ACE_TEXT(), TAO_Notify::Delivery_Request_Ptr, TAO_Notify_EventChannelFactory::find_proxy_consumer(), TAO_Notify_Object::ID, TAO_Notify::IdVec, LM_ERROR, and ACE_Vector< T, DEFAULT_SIZE >::push_back(). Referenced by TAO_Notify::Routing_Slip::unmarshal().
00116 { 00117 bool ok = true; 00118 TAO_Notify_Method_Request_Lookup_Queueable * result = 0; 00119 CORBA::ULong count; 00120 if (cdr.read_ulong (count)) 00121 { 00122 TAO_Notify::IdVec id_path (count); 00123 for (size_t nid = 0; ok && nid < count; ++nid) 00124 { 00125 TAO_Notify_Object::ID id = 0; 00126 if ( cdr.read_long (id)) 00127 { 00128 id_path.push_back (id); 00129 } 00130 else 00131 { 00132 ok = false; 00133 } 00134 } 00135 00136 if (ok) 00137 { 00138 TAO_Notify_ProxyConsumer * proxy_consumer = ecf.find_proxy_consumer ( 00139 id_path, 00140 0 ACE_ENV_ARG_PARAMETER); 00141 ACE_CHECK_RETURN(0); 00142 if (proxy_consumer != 0) 00143 { 00144 ACE_NEW_NORETURN (result, 00145 TAO_Notify_Method_Request_Lookup_Queueable (delivery_request, proxy_consumer)); 00146 } 00147 else 00148 { 00149 ACE_ERROR ((LM_ERROR, 00150 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Lookup_No_Copy::unmarshal: unknown proxy id\n") 00151 )); 00152 } 00153 } 00154 else 00155 { 00156 ACE_ERROR ((LM_ERROR, 00157 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Lookup_No_Copy::unmarshal: Cant read proxy id path\n") 00158 )); 00159 } 00160 } 00161 return result; 00162 00163 } |
|
= TAO_ESF_Worker method
Implements TAO_ESF_Worker< TAO_Notify_ProxySupplier >. Definition at line 39 of file Method_Request_Lookup.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and ACE_Strong_Bound_Ptr< X, ACE_LOCK >::get().
00042 { 00043 if (delivery_request_.get () == 0) 00044 { 00045 TAO_Notify_Method_Request_Dispatch_No_Copy request (*this, proxy_supplier, true); 00046 proxy_supplier->deliver (request ACE_ENV_ARG_PARAMETER); 00047 ACE_CHECK; 00048 } 00049 else 00050 { 00051 delivery_request_->dispatch (proxy_supplier, true ACE_ENV_ARG_PARAMETER); 00052 ACE_CHECK; 00053 } 00054 } |
|
The Proxy.
Definition at line 72 of file Method_Request_Lookup.h. Referenced by execute_i(). |