#include <Method_Request_Dispatch.h>
Inheritance diagram for TAO_Notify_Method_Request_Dispatch:


Public Types | |
| enum | { persistence_code = 1 } |
| an arbitrary code (Octet) to identify this delivery method type in persistent storage More... | |
Public Member Functions | |
| TAO_Notify_Method_Request_Dispatch (const TAO_Notify_Event *event, TAO_Notify_ProxySupplier *proxy_supplier, bool filtering) | |
| Constuct from event. | |
| TAO_Notify_Method_Request_Dispatch (const TAO_Notify::Delivery_Request_Ptr &delivery, TAO_Notify_ProxySupplier *proxy_supplier, bool filtering) | |
| Construct from a delivery rquest. | |
| TAO_Notify_Method_Request_Dispatch (const TAO_Notify_Method_Request_Event &request, const TAO_Notify_Event *event, TAO_Notify_ProxySupplier *proxy_supplier, bool filtering) | |
| virtual | ~TAO_Notify_Method_Request_Dispatch () |
| Destructor. | |
Static Public Member Functions | |
| TAO_Notify_Method_Request_Dispatch_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 | |
| int | execute_i () |
| Execute the dispatch operation. | |
Protected Attributes | |
| TAO_Notify_ProxySupplier::Ptr | proxy_supplier_ |
| The Proxy. | |
| bool | filtering_ |
| Flag is true if we want to do filtering else false. | |
|
|
an arbitrary code (Octet) to identify this delivery method type in persistent storage
Definition at line 44 of file Method_Request_Dispatch.h.
00044 {persistence_code = 1};
|
|
||||||||||||||||
|
Constuct from event.
Definition at line 25 of file Method_Request_Dispatch.cpp.
00029 : TAO_Notify_Method_Request_Event (event) 00030 , proxy_supplier_ (proxy_supplier) 00031 , filtering_ (filtering) 00032 { 00033 } |
|
||||||||||||||||
|
Construct from a delivery rquest.
Definition at line 36 of file Method_Request_Dispatch.cpp. References TAO_Notify::Delivery_Request_Ptr.
00040 : TAO_Notify_Method_Request_Event (delivery) 00041 , proxy_supplier_ (proxy_supplier) 00042 , filtering_ (filtering) 00043 { 00044 } |
|
||||||||||||||||||||
|
Constuct construct from another method request+event event is passed separately because we may be using a copy of the one in the previous method request Definition at line 49 of file Method_Request_Dispatch.cpp.
00054 : TAO_Notify_Method_Request_Event (request, event) 00055 , proxy_supplier_ (proxy_supplier) 00056 , filtering_ (filtering) 00057 { 00058 } |
|
|
Destructor.
Definition at line 60 of file Method_Request_Dispatch.cpp. References ACE_DEBUG, ACE_TEXT(), and LM_DEBUG.
00061 {
00062 #if 0
00063 ACE_DEBUG ((LM_DEBUG,
00064 ACE_TEXT ("(%P|%t) Destroy TAO_Notify_Method_Request_Dispatch @%@\n"),
00065 this));
00066 #endif
00067 }
|
|
|
Execute the dispatch operation.
Definition at line 69 of file Method_Request_Dispatch.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_DEBUG, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TEXT(), ACE_TRY, ACE_TRY_CHECK, TAO_Notify_Consumer::deliver(), TAO_Notify_Admin::filter_admin(), TAO_Notify_Admin::filter_operator(), filtering_, LM_DEBUG, proxy_supplier_, and TAO_debug_level. Referenced by TAO_Notify_Method_Request_Dispatch_No_Copy::execute(), and TAO_Notify_Method_Request_Dispatch_Queueable::execute().
00070 {
00071 if (this->proxy_supplier_->has_shutdown ())
00072 return 0; // If we were shutdown while waiting in the queue, return with no action.
00073
00074 if (this->filtering_ == 1)
00075 {
00076 TAO_Notify_Admin& parent = this->proxy_supplier_->consumer_admin ();
00077 CORBA::Boolean val = this->proxy_supplier_->check_filters (this->event_,
00078 parent.filter_admin (),
00079 parent.filter_operator ()
00080 ACE_ENV_ARG_PARAMETER);
00081 ACE_CHECK_RETURN (-1);
00082
00083 if (TAO_debug_level > 1)
00084 ACE_DEBUG ((LM_DEBUG, "Proxysupplier %x filter eval result = %d",&this->proxy_supplier_ , val));
00085
00086 // Filter failed - do nothing.
00087 if (val == 0)
00088 return 0;
00089 }
00090
00091 ACE_TRY
00092 {
00093 TAO_Notify_Consumer* consumer = this->proxy_supplier_->consumer ();
00094
00095 if (consumer != 0)
00096 {
00097 consumer->deliver (this ACE_ENV_ARG_PARAMETER);
00098 ACE_TRY_CHECK;
00099 }
00100 }
00101 ACE_CATCHANY
00102 {
00103 if (TAO_debug_level > 0)
00104 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
00105 ACE_TEXT ("TAO_Notify_Method_Request_Dispatch::: error sending event.\n ")
00106 );
00107 }
00108 ACE_ENDTRY;
00109
00110 return 0;
00111 }
|
|
||||||||||||||||
|
Static method used to reconstruct a Method Request Dispatch.
Definition at line 115 of file Method_Request_Dispatch.cpp. References ACE_CHECK_RETURN, ACE_CString, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_ERROR, ACE_NEW_NORETURN, ACE_TEXT(), DEBUG_LEVEL, TAO_Notify::Delivery_Request_Ptr, TAO_Notify_EventChannelFactory::find_proxy_consumer(), TAO_Notify_EventChannelFactory::find_proxy_supplier(), TAO_Notify_Object::ID, TAO_Notify::IdVec, LM_DEBUG, LM_ERROR, ACE_Vector< T, DEFAULT_SIZE >::push_back(), and ACE_OS::snprintf(). Referenced by TAO_Notify::Routing_Slip::unmarshal().
00120 {
00121 bool ok = true;
00122 TAO_Notify_Method_Request_Dispatch_Queueable * result = 0;
00123 ACE_CString textpath;
00124 CORBA::ULong count;
00125 if (cdr.read_ulong (count))
00126 {
00127 TAO_Notify::IdVec id_path (count);
00128 for (size_t nid = 0; ok && nid < count; ++nid)
00129 {
00130 TAO_Notify_Object::ID id = 0;
00131 if ( cdr.read_long (id))
00132 {
00133 id_path.push_back (id);
00134 char idbuf[20];
00135 ACE_OS::snprintf (idbuf, sizeof(idbuf)-1, "/%d", static_cast<int> (id));
00136 textpath += idbuf;
00137 }
00138 else
00139 {
00140 ok = false;
00141 }
00142 }
00143
00144 if (ok)
00145 {
00146 TAO_Notify_ProxySupplier* proxy_supplier = ecf.find_proxy_supplier (id_path,
00147 0 ACE_ENV_ARG_PARAMETER);
00148 ACE_CHECK_RETURN(0);
00149 if (proxy_supplier != 0)
00150 {
00151 if (DEBUG_LEVEL > 6) ACE_DEBUG ((LM_DEBUG,
00152 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch reload event for %s\n")
00153 , textpath.c_str()
00154 ));
00155 ACE_NEW_NORETURN (result,
00156 TAO_Notify_Method_Request_Dispatch_Queueable (delivery_request, proxy_supplier, true));
00157 }
00158 else
00159 {
00160 TAO_Notify_ProxyConsumer * proxy_consumer = ecf.find_proxy_consumer (id_path, 0 ACE_ENV_ARG_PARAMETER); //@@todo
00161 if (proxy_consumer == 0)
00162 {
00163 ACE_ERROR ((LM_ERROR,
00164 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch::unmarshal: unknown proxy id %s\n")
00165 , textpath.c_str()
00166 ));
00167 }
00168 else
00169 {
00170 ACE_ERROR ((LM_ERROR,
00171 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch::unmarshal: wrong type of proxy id %s\n")
00172 , textpath.c_str()
00173 ));
00174 }
00175 }
00176 }
00177 else
00178 {
00179 ACE_ERROR ((LM_ERROR,
00180 ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch::unmarshal: Cant read proxy id path\n")
00181 ));
00182 }
00183 }
00184 return result;
00185 }
|
|
|
Flag is true if we want to do filtering else false.
Definition at line 88 of file Method_Request_Dispatch.h. Referenced by execute_i(). |
|
|
The Proxy.
Definition at line 85 of file Method_Request_Dispatch.h. Referenced by TAO_Notify_Method_Request_Dispatch_No_Copy::copy(), and execute_i(). |
1.3.6