Method_Request_Event.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file Method_Request_Event.h
00005  *
00006  *  Method_Request_Event.h,v 1.11 2006/03/14 06:14:34 jtc Exp
00007  *
00008  *  @author Pradeep Gore <pradeep@oomworks.com>
00009  */
00010 
00011 #ifndef TAO_Notify_METHOD_REQUEST_EVENT_H
00012 #define TAO_Notify_METHOD_REQUEST_EVENT_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/Event.h"
00023 #include "orbsvcs/Notify/ProxySupplier.h"
00024 #include "tao/Basic_Types.h"
00025 #include "ace/CORBA_macros.h"
00026 #include "orbsvcs/Notify/Delivery_Request.h"
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 /**
00031  * @class TAO_Notify_Method_Request_Event
00032  *
00033  * @brief A base class for all Method Requests that are associated with events.
00034  *
00035  */
00036 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Event
00037 {
00038 public:
00039   /// Construct from event
00040   TAO_Notify_Method_Request_Event (const TAO_Notify_Event *);
00041 
00042   /// Construct from a delivery request
00043   TAO_Notify_Method_Request_Event (
00044     const TAO_Notify::Delivery_Request_Ptr & delivery_request);
00045 
00046   /// Construct from another Method Request
00047   /// Event is passed separately because it may be a copy of the one in request.
00048   TAO_Notify_Method_Request_Event (const TAO_Notify_Method_Request_Event & rhs,
00049     const TAO_Notify_Event * event);
00050 
00051 public:
00052   /// Destructor
00053   virtual ~TAO_Notify_Method_Request_Event ();
00054 
00055   const TAO_Notify_Event * event() const;
00056   void complete ();
00057   unsigned long sequence ();
00058   bool should_retry ();
00059 
00060 protected:
00061 
00062   /// The Event
00063   const TAO_Notify_Event * event_;
00064 
00065   /// Pointer to the routing slip's delivery request (if any)
00066   TAO_Notify::Delivery_Request_Ptr delivery_request_;
00067 };
00068 
00069 /***************************************************************/
00070 
00071 /**
00072  * @class TAO_Notify_Method_Request_Event_Queueable
00073  *
00074  * @brief A method request for storing events.
00075  *
00076  */
00077 class TAO_Notify_Serv_Export TAO_Notify_Method_Request_Event_Queueable
00078   : public TAO_Notify_Method_Request_Queueable
00079   , public TAO_Notify_Method_Request_Event
00080 {
00081 public:
00082   /// Constuctor
00083   /// Not the event_var is passed as a separate parameter to avoid throwing
00084   /// exceptions from the constructor if it's necessary to copy the event.
00085   TAO_Notify_Method_Request_Event_Queueable (
00086     const TAO_Notify_Method_Request_Event & prev_request,
00087     const TAO_Notify_Event::Ptr & event);
00088 
00089   TAO_Notify_Method_Request_Event_Queueable (
00090     TAO_Notify::Delivery_Request_Ptr & request);
00091 
00092   /// Destructor
00093   virtual ~TAO_Notify_Method_Request_Event_Queueable ();
00094 
00095   /// satisfy the pure virtual method.  Should never be called.
00096   virtual int execute (ACE_ENV_SINGLE_ARG_DECL);
00097 private:
00098   TAO_Notify_Event::Ptr event_var_;
00099 };
00100 
00101 TAO_END_VERSIONED_NAMESPACE_DECL
00102 
00103 #include /**/ "ace/post.h"
00104 #endif /* TAO_Notify_METHOD_REQUEST_EVENT_H */

Generated on Thu Nov 9 13:24:12 2006 for TAO_CosNotification by doxygen 1.3.6