#include <Method_Request_Dispatch.h>
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 | |
static 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 (void) |
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. |
Definition at line 39 of file Method_Request_Dispatch.h.
anonymous enum |
an arbitrary code (Octet) to identify this delivery method type in persistent storage
Definition at line 44 of file Method_Request_Dispatch.h.
{persistence_code = 1};
TAO_Notify_Method_Request_Dispatch::TAO_Notify_Method_Request_Dispatch | ( | const TAO_Notify_Event * | event, | |
TAO_Notify_ProxySupplier * | proxy_supplier, | |||
bool | filtering | |||
) |
Constuct from event.
Definition at line 25 of file Method_Request_Dispatch.cpp.
: TAO_Notify_Method_Request_Event (event) , proxy_supplier_ (proxy_supplier) , filtering_ (filtering) { }
TAO_Notify_Method_Request_Dispatch::TAO_Notify_Method_Request_Dispatch | ( | const TAO_Notify::Delivery_Request_Ptr & | delivery, | |
TAO_Notify_ProxySupplier * | proxy_supplier, | |||
bool | filtering | |||
) |
Construct from a delivery rquest.
Definition at line 36 of file Method_Request_Dispatch.cpp.
: TAO_Notify_Method_Request_Event (delivery) , proxy_supplier_ (proxy_supplier) , filtering_ (filtering) { }
TAO_Notify_Method_Request_Dispatch::TAO_Notify_Method_Request_Dispatch | ( | const TAO_Notify_Method_Request_Event & | request, | |
const TAO_Notify_Event * | event, | |||
TAO_Notify_ProxySupplier * | proxy_supplier, | |||
bool | filtering | |||
) |
Constuct 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.
: TAO_Notify_Method_Request_Event (request, event) , proxy_supplier_ (proxy_supplier) , filtering_ (filtering) { }
TAO_Notify_Method_Request_Dispatch::~TAO_Notify_Method_Request_Dispatch | ( | ) | [virtual] |
int TAO_Notify_Method_Request_Dispatch::execute_i | ( | void | ) | [protected] |
Execute the dispatch operation.
Definition at line 64 of file Method_Request_Dispatch.cpp.
{ if (this->proxy_supplier_->has_shutdown ()) return 0; // If we were shutdown while waiting in the queue, return with no action. if (this->filtering_ == 1) { TAO_Notify_Admin& parent = this->proxy_supplier_->consumer_admin (); CORBA::Boolean const val = this->proxy_supplier_->check_filters (this->event_, parent.filter_admin (), parent.filter_operator ()); if (TAO_debug_level > 1) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Notify (%P|%t) Proxysupplier %x filter ") ACE_TEXT ("eval result = %d\n"), &this->proxy_supplier_ , val)); // Filter failed - do nothing. if (!val) return 0; } try { TAO_Notify_Consumer* consumer = this->proxy_supplier_->consumer (); if (consumer != 0) { consumer->deliver (this); } } catch (const CORBA::Exception& ex) { if (TAO_debug_level > 0) ex._tao_print_exception ( ACE_TEXT ( "TAO_Notify_Method_Request_Dispatch::: error sending event.\n")); } return 0; }
TAO_Notify_Method_Request_Dispatch_Queueable * TAO_Notify_Method_Request_Dispatch::unmarshal | ( | TAO_Notify::Delivery_Request_Ptr & | delivery_request, | |
TAO_Notify_EventChannelFactory & | ecf, | |||
TAO_InputCDR & | cdr | |||
) | [static] |
Static method used to reconstruct a Method Request Dispatch.
Definition at line 109 of file Method_Request_Dispatch.cpp.
{ bool ok = true; TAO_Notify_Method_Request_Dispatch_Queueable * result = 0; ACE_CString textpath; CORBA::ULong count; if (cdr.read_ulong (count)) { TAO_Notify::IdVec id_path (count); for (size_t nid = 0; ok && nid < count; ++nid) { TAO_Notify_Object::ID id = 0; if ( cdr.read_long (id)) { id_path.push_back (id); char idbuf[20]; ACE_OS::snprintf (idbuf, sizeof(idbuf), "/%d", static_cast<int> (id)); textpath += idbuf; } else { ok = false; } } if (ok) { TAO_Notify_ProxySupplier* proxy_supplier = ecf.find_proxy_supplier (id_path, 0); if (proxy_supplier != 0) { if (DEBUG_LEVEL > 6) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch") ACE_TEXT (" reload event for %C\n"), textpath.c_str())); ACE_NEW_NORETURN (result, TAO_Notify_Method_Request_Dispatch_Queueable (delivery_request, proxy_supplier, true)); } else { TAO_Notify_ProxyConsumer * proxy_consumer = ecf.find_proxy_consumer (id_path, 0); //@@todo if (proxy_consumer == 0) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch") ACE_TEXT ("::unmarshal: unknown proxy id %C\n"), textpath.c_str())); } else { ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch") ACE_TEXT ("::unmarshal: wrong type of proxy id %C\n"), textpath.c_str())); } } } else { ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Dispatch") ACE_TEXT ("::unmarshal: Cant read proxy id path\n"))); } } return result; }
bool TAO_Notify_Method_Request_Dispatch::filtering_ [protected] |
Flag is true if we want to do filtering else false.
Definition at line 87 of file Method_Request_Dispatch.h.
The Proxy.
Definition at line 84 of file Method_Request_Dispatch.h.