#include <Method_Request_Lookup.h>


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 | |
| static 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) | |
| Constructor. | |
| TAO_Notify_Method_Request_Lookup (const TAO_Notify::Delivery_Request_Ptr &delivery, TAO_Notify_ProxyConsumer *proxy) | |
| Constructor. | |
| int | execute_i (void) |
| 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. | |
Definition at line 40 of file Method_Request_Lookup.h.
| anonymous enum |
an arbitrary code (Octet) to identify this type of request in persistent storage
Definition at line 47 of file Method_Request_Lookup.h.
{persistence_code = 2};
| TAO_Notify_Method_Request_Lookup::~TAO_Notify_Method_Request_Lookup | ( | ) | [virtual] |
| TAO_Notify_Method_Request_Lookup::TAO_Notify_Method_Request_Lookup | ( | const TAO_Notify_Event * | event, | |
| TAO_Notify_ProxyConsumer * | proxy | |||
| ) | [protected] |
Constructor.
Definition at line 26 of file Method_Request_Lookup.cpp.
: TAO_Notify_Method_Request_Event (event) , proxy_consumer_ (proxy) { }
| TAO_Notify_Method_Request_Lookup::TAO_Notify_Method_Request_Lookup | ( | const TAO_Notify::Delivery_Request_Ptr & | delivery, | |
| TAO_Notify_ProxyConsumer * | proxy | |||
| ) | [protected] |
Constructor.
Definition at line 34 of file Method_Request_Lookup.cpp.
: TAO_Notify_Method_Request_Event (delivery) , proxy_consumer_ (proxy) { }
| int TAO_Notify_Method_Request_Lookup::execute_i | ( | void | ) | [protected] |
Execute the dispatch operation.
Definition at line 61 of file Method_Request_Lookup.cpp.
{
if (this->proxy_consumer_->has_shutdown ())
return 0; // If we were shutdown while waiting in the queue, return with no action.
TAO_Notify_SupplierAdmin& parent = this->proxy_consumer_->supplier_admin ();
CORBA::Boolean val = this->proxy_consumer_->check_filters (this->event_,
parent.filter_admin (),
parent.filter_operator ());
if (TAO_debug_level > 1)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Notify (%P|%t) Proxyconsumer %x filter ")
ACE_TEXT("eval result = %d\n"),
&this->proxy_consumer_ , val));
// Filter failed - do nothing.
if (!val)
return 0;
// The map of subscriptions.
TAO_Notify_Consumer_Map& map = this->proxy_consumer_->event_manager ().consumer_map ();
TAO_Notify_Consumer_Map::ENTRY* entry = map.find (this->event_->type ());
TAO_Notify_ProxySupplier_Collection* consumers = 0;
if (entry != 0)
{
consumers = entry->collection ();
if (consumers != 0)
{
consumers->for_each (this);
}
map.release (entry);
}
// Get the default consumers
consumers = map.broadcast_collection ();
if (consumers != 0)
{
consumers->for_each (this);
}
this->complete ();
return 0;
}
| TAO_Notify_Method_Request_Lookup_Queueable * TAO_Notify_Method_Request_Lookup::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 113 of file Method_Request_Lookup.cpp.
{
bool ok = true;
TAO_Notify_Method_Request_Lookup_Queueable * result = 0;
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);
}
else
{
ok = false;
}
}
if (ok)
{
TAO_Notify_ProxyConsumer * proxy_consumer = ecf.find_proxy_consumer (
id_path,
0);
if (proxy_consumer != 0)
{
ACE_NEW_NORETURN (result,
TAO_Notify_Method_Request_Lookup_Queueable (delivery_request, proxy_consumer));
}
else
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Lookup_No_Copy::unmarshal: unknown proxy id\n")
));
}
}
else
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Notify_Method_Request_Lookup_No_Copy::unmarshal: Cant read proxy id path\n")
));
}
}
return result;
}
| void TAO_Notify_Method_Request_Lookup::work | ( | TAO_Notify_ProxySupplier * | proxy_supplier | ) | [protected, virtual] |
= TAO_ESF_Worker method
Definition at line 47 of file Method_Request_Lookup.cpp.
{
if (delivery_request_.get () == 0)
{
TAO_Notify_Method_Request_Dispatch_No_Copy request (*this, proxy_supplier, true);
proxy_supplier->deliver (request);
}
else
{
delivery_request_->dispatch (proxy_supplier, true);
}
}
The Proxy.
Definition at line 74 of file Method_Request_Lookup.h.
1.7.0