Method_Request_Lookup.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Method_Request_Lookup.h
00005  *
00006  *  $Id: Method_Request_Lookup.h 81422 2008-04-24 12:33:29Z johnnyw $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 #ifndef TAO_Notify_LOOKUP_METHOD_REQUEST_H
00011 #define TAO_Notify_LOOKUP_METHOD_REQUEST_H
00012 #include /**/ "ace/pre.h"
00013 
00014 #include "orbsvcs/Notify/notify_serv_export.h"
00015 
00016 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00017 # pragma once
00018 #endif /* ACE_LACKS_PRAGMA_ONCE */
00019 
00020 #include "orbsvcs/ESF/ESF_Worker.h"
00021 #include "orbsvcs/Notify/Method_Request_Event.h"
00022 #include "orbsvcs/Notify/ProxySupplier.h"
00023 #include "orbsvcs/Notify/ProxyConsumer.h"
00024 #include "orbsvcs/Notify/Consumer_Map.h"
00025 #include "orbsvcs/Notify/Delivery_Request.h"
00026 
00027 #include "orbsvcs/ESF/ESF_Worker.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_Notify_Method_Request_Lookup_Queueable;
00032 class TAO_Notify_Event;
00033 
00034 /**
00035  * @class TAO_Notify_Method_Request_Lookup
00036  *
00037  * @brief
00038  *
00039  */
00040 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Lookup
00041   : public TAO_ESF_Worker<TAO_Notify_ProxySupplier>
00042   , public TAO_Notify_Method_Request_Event
00043 {
00044 public:
00045 
00046   /// an arbitrary code (Octet) to identify this type of request in persistent storage
00047   enum {persistence_code = 2};
00048 
00049   /// Destructor
00050   virtual ~TAO_Notify_Method_Request_Lookup ();
00051 
00052   /// Static method used to reconstruct a Method Request Dispatch
00053   static TAO_Notify_Method_Request_Lookup_Queueable * unmarshal (
00054     TAO_Notify::Delivery_Request_Ptr & delivery_request,
00055     TAO_Notify_EventChannelFactory &ecf,
00056     TAO_InputCDR & cdr);
00057 
00058 protected:
00059   /// Constructor
00060   TAO_Notify_Method_Request_Lookup (const TAO_Notify_Event * event, TAO_Notify_ProxyConsumer * proxy);
00061 
00062   /// Constructor
00063   TAO_Notify_Method_Request_Lookup (const TAO_Notify::Delivery_Request_Ptr& delivery, TAO_Notify_ProxyConsumer * proxy);
00064 
00065   /// Execute the dispatch operation.
00066   int execute_i (void);
00067 
00068   ///= TAO_ESF_Worker method
00069   virtual void work (TAO_Notify_ProxySupplier* proxy_supplier);
00070 
00071 protected:
00072 
00073   /// The Proxy
00074   TAO_Notify_ProxyConsumer* proxy_consumer_;
00075 };
00076 
00077 /***************************************************************/
00078 
00079 /**
00080  * @class TAO_Notify_Method_Request_Lookup_Queueable
00081  *
00082  * @brief Lookup command object looks up the event type of the given event in the consumer map and send the event to each proxysupplier.
00083  *
00084  */
00085 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Lookup_Queueable
00086   : public TAO_Notify_Method_Request_Lookup
00087   , public TAO_Notify_Method_Request_Queueable
00088 {
00089 public:
00090   /// Constructor from event
00091   TAO_Notify_Method_Request_Lookup_Queueable (
00092     const TAO_Notify_Event::Ptr& event,
00093     TAO_Notify_ProxyConsumer * proxy_consumer);
00094 
00095   /// Constructor from delivery request
00096   TAO_Notify_Method_Request_Lookup_Queueable (
00097     TAO_Notify::Delivery_Request_Ptr & request,
00098     TAO_Notify_ProxyConsumer * proxy_consumer);
00099 
00100   /// Destructor
00101   virtual ~TAO_Notify_Method_Request_Lookup_Queueable ();
00102 
00103   /// Execute the Request
00104   virtual int execute (void);
00105 
00106 private:
00107   TAO_Notify_Event::Ptr event_var_;
00108   TAO_Notify_ProxyConsumer::Ptr proxy_guard_;
00109 };
00110 
00111 /*****************************************************************************************************************************/
00112 
00113 /**
00114  * @class TAO_Notify_Method_Request_Lookup_No_Copy
00115  *
00116  * @brief Lookup command object looks up the event type of the given event in the consumer map and send the event to each proxysupplier.
00117  *
00118  */
00119 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Lookup_No_Copy
00120   : public TAO_Notify_Method_Request_Lookup
00121   , public TAO_Notify_Method_Request
00122 {
00123 public:
00124   /// Constructor
00125   TAO_Notify_Method_Request_Lookup_No_Copy (
00126     const TAO_Notify_Event* event,
00127     TAO_Notify_ProxyConsumer* proxy_consumer);
00128 
00129   /// Destructor
00130   virtual ~TAO_Notify_Method_Request_Lookup_No_Copy ();
00131 
00132   /// Execute the Request
00133   virtual int execute (void);
00134 
00135   /// Create a copy of this object.
00136   virtual TAO_Notify_Method_Request_Queueable* copy (void);
00137 };
00138 
00139 TAO_END_VERSIONED_NAMESPACE_DECL
00140 
00141 #include /**/ "ace/post.h"
00142 #endif /* TAO_Notify_LOOKUP_METHOD_REQUEST_H */

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7