Method_Request_Dispatch.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Method_Request_Dispatch.h
00005  *
00006  *  $Id: Method_Request_Dispatch.h 79324 2007-08-13 11:20:01Z elliott_c $
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_DISPATCH_METHOD_REQUEST_H
00012 #define TAO_Notify_DISPATCH_METHOD_REQUEST_H
00013 #include /**/ "ace/pre.h"
00014 
00015 #include "orbsvcs/Notify/notify_serv_export.h"
00016 
00017 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00018 # pragma once
00019 #endif /* ACE_LACKS_PRAGMA_ONCE */
00020 
00021 #include "orbsvcs/Notify/Method_Request.h"
00022 #include "orbsvcs/Notify/Refcountable.h"
00023 #include "orbsvcs/Notify/Method_Request_Event.h"
00024 #include "orbsvcs/Notify/ProxySupplier.h"
00025 #include "orbsvcs/Notify/Delivery_Request.h"
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 class TAO_Notify_EventChannelFactory;
00030 class TAO_InputCDR;
00031 class TAO_Notify_Method_Request_Dispatch_Queueable;
00032 
00033 /**
00034  * @class TAO_Notify_Method_Request_Dispatch
00035  *
00036  * @brief
00037  *
00038  */
00039 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Dispatch
00040   : public TAO_Notify_Method_Request_Event
00041 {
00042 public:
00043   /// an arbitrary code (Octet) to identify this delivery method type in persistent storage
00044   enum {persistence_code = 1};
00045 
00046   /// Constuct from event
00047   TAO_Notify_Method_Request_Dispatch (
00048     const TAO_Notify_Event * event,
00049     TAO_Notify_ProxySupplier* proxy_supplier,
00050     bool filtering);
00051 
00052   /// Construct from a delivery rquest
00053   TAO_Notify_Method_Request_Dispatch (
00054     const TAO_Notify::Delivery_Request_Ptr & delivery,
00055     TAO_Notify_ProxySupplier* proxy_supplier,
00056     bool filtering);
00057 
00058   /// Constuct from another method request+event
00059   /// event is passed separately because we may be using a copy
00060   /// of the one in the previous method request
00061   TAO_Notify_Method_Request_Dispatch (
00062     const TAO_Notify_Method_Request_Event & request,
00063     const TAO_Notify_Event * event,
00064     TAO_Notify_ProxySupplier* proxy_supplier,
00065     bool filtering);
00066 
00067 public:
00068   /// Destructor
00069   virtual ~TAO_Notify_Method_Request_Dispatch ();
00070 
00071   /// Static method used to reconstruct a Method Request Dispatch
00072   static TAO_Notify_Method_Request_Dispatch_Queueable * unmarshal (
00073     TAO_Notify::Delivery_Request_Ptr & delivery_request,
00074     TAO_Notify_EventChannelFactory &ecf,
00075     TAO_InputCDR & cdr);
00076 
00077 
00078 protected:
00079   /// Execute the dispatch operation.
00080   int execute_i (void);
00081 
00082 protected:
00083   /// The Proxy
00084   TAO_Notify_ProxySupplier::Ptr proxy_supplier_;
00085 
00086   /// Flag is true if we want to do filtering else false.
00087   bool filtering_;
00088 };
00089 
00090 /**
00091  * @class TAO_Notify_Method_Request_Dispatch_Queueable
00092  *
00093  * @brief Dispatchs an event to a proxy supplier.
00094  *
00095  */
00096 
00097 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Dispatch_Queueable
00098     : public TAO_Notify_Method_Request_Dispatch
00099     , public TAO_Notify_Method_Request_Queueable
00100 {
00101 public:
00102   /// Construct construct from another method request+event
00103   /// event is passed separately because we may be using a copy
00104   /// of the one in the previous method request
00105   TAO_Notify_Method_Request_Dispatch_Queueable (
00106     const TAO_Notify_Method_Request_Event & request,
00107     TAO_Notify_Event::Ptr & event,
00108     TAO_Notify_ProxySupplier* proxy_supplier,
00109     bool filtering);
00110 
00111   /// Constuct construct from Delivery Request
00112   /// should ONLY be used by unmarshall
00113   TAO_Notify_Method_Request_Dispatch_Queueable (
00114     const TAO_Notify::Delivery_Request_Ptr & request,
00115     TAO_Notify_ProxySupplier* proxy_supplier,
00116     bool filtering);
00117 
00118   /// Destructor
00119   virtual ~TAO_Notify_Method_Request_Dispatch_Queueable ();
00120 
00121   /// Execute the Request
00122   virtual int execute (void);
00123 
00124 private:
00125   TAO_Notify_Event::Ptr event_var_;
00126   TAO_Notify_ProxySupplier::Ptr proxy_guard_;
00127 };
00128 
00129 /*****************************************************************************/
00130 
00131 /**
00132  * @class TAO_Notify_Method_Request_Dispatch_No_Copy
00133  *
00134  * @brief Dispatchs an event to a proxy supplier.
00135  *
00136  */
00137 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Dispatch_No_Copy
00138     : public TAO_Notify_Method_Request_Dispatch
00139     , public TAO_Notify_Method_Request
00140 {
00141 public:
00142   /// Constuct construct from another method request
00143   TAO_Notify_Method_Request_Dispatch_No_Copy (
00144     const TAO_Notify_Method_Request_Event & request,
00145     TAO_Notify_ProxySupplier* proxy_supplier,
00146     bool filtering);
00147 
00148   /// Destructor
00149   virtual ~TAO_Notify_Method_Request_Dispatch_No_Copy ();
00150 
00151   /// Execute the Request
00152   virtual int execute (void);
00153 
00154   /// Create a copy of this method request
00155   virtual TAO_Notify_Method_Request_Queueable* copy (void);
00156 };
00157 
00158 /*****************************************************************************/
00159 
00160 TAO_END_VERSIONED_NAMESPACE_DECL
00161 
00162 #include /**/ "ace/post.h"
00163 #endif /* TAO_Notify_DISPATCH_METHOD_REQUEST_H */

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