DII_Reply_Handler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==============================================================
00004 /**
00005  *  @file DII_Reply_Handler.h
00006  *
00007  *  $Id: DII_Reply_Handler.h 81429 2008-04-24 18:49:54Z johnnyw $
00008  *
00009  *  @brief Handler of DII twoway asynch replies type.
00010  */
00011 // =============================================================
00012 
00013 #ifndef TAO_DII_REPLY_HANDLER_H
00014 #define TAO_DII_REPLY_HANDLER_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "tao/orbconf.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/LocalObject.h"
00024 #include "dynamicinterface_export.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /// Forward declaration
00029 class TAO_DII_Reply_Handler;
00030 typedef TAO_DII_Reply_Handler* TAO_DII_Reply_Handler_ptr;
00031 
00032 /**
00033  * @class TAO_DII_Reply_Handler_var
00034  *
00035  * @brief The T_var class for reply handler
00036  *
00037  * As any other pseudo object, this class has a T_var class too.
00038  *
00039  */
00040 class TAO_DynamicInterface_Export TAO_DII_Reply_Handler_var
00041 {
00042 public:
00043   TAO_DII_Reply_Handler_var (void);
00044   TAO_DII_Reply_Handler_var (TAO_DII_Reply_Handler_ptr);
00045   TAO_DII_Reply_Handler_var (const TAO_DII_Reply_Handler_var &);
00046   ~TAO_DII_Reply_Handler_var (void);
00047 
00048   TAO_DII_Reply_Handler_var &operator= (TAO_DII_Reply_Handler_ptr);
00049   TAO_DII_Reply_Handler_var &operator= (const TAO_DII_Reply_Handler_var &);
00050   TAO_DII_Reply_Handler_ptr operator-> (void) const;
00051 
00052   operator const TAO_DII_Reply_Handler_ptr &() const;
00053   operator TAO_DII_Reply_Handler_ptr &();
00054 
00055   TAO_DII_Reply_Handler_ptr in (void) const;
00056   TAO_DII_Reply_Handler_ptr &inout (void);
00057   TAO_DII_Reply_Handler_ptr &out (void);
00058   TAO_DII_Reply_Handler_ptr _retn (void);
00059   TAO_DII_Reply_Handler_ptr ptr (void) const;
00060 
00061 private:
00062   TAO_DII_Reply_Handler_ptr ptr_;
00063 };
00064 
00065 /**
00066  * @class TAO_DII_Reply_Handler
00067  *
00068  * @brief The class for DII reply handler
00069  *
00070  * Provides a way to create requests and populate it with parameters for
00071  * use in the Dynamic Invocation Interface.
00072  */
00073 class TAO_DynamicInterface_Export TAO_DII_Reply_Handler
00074   : public virtual ::CORBA::LocalObject
00075 {
00076 public:
00077   TAO_DII_Reply_Handler ();
00078   virtual ~TAO_DII_Reply_Handler (void);
00079 
00080   /// Callback method for asynchronous requests.
00081   virtual void handle_response (TAO_InputCDR &incoming) = 0;
00082 
00083   virtual void handle_excep (TAO_InputCDR &incoming,
00084                              CORBA::ULong reply_status) = 0;
00085 
00086   /// Handle a location forward message. This one has a default method
00087   /// supplied that simply forwards to the handle_response, since that
00088   /// is what the legacy code did. This way we maintain backwards
00089   /// compatibility.
00090   virtual void handle_location_forward (TAO_InputCDR &incoming,
00091                                         CORBA::ULong reply_status);
00092 
00093   /// CORBA Object related methods
00094   static TAO_DII_Reply_Handler* _duplicate (TAO_DII_Reply_Handler_ptr);
00095   static TAO_DII_Reply_Handler* _nil (void);
00096   static TAO_DII_Reply_Handler* _narrow (CORBA::Object_ptr);
00097   static TAO_DII_Reply_Handler* _unchecked_narrow (CORBA::Object_ptr);
00098 
00099   static int _tao_class_id;
00100 
00101   typedef TAO_DII_Reply_Handler_ptr _ptr_type;
00102   typedef TAO_DII_Reply_Handler_var _var_type;
00103 
00104 };
00105 
00106 TAO_END_VERSIONED_NAMESPACE_DECL
00107 
00108 #if defined (__ACE_INLINE__)
00109 # include "DII_Reply_Handler.inl"
00110 #endif /* __ACE_INLINE__ */
00111 
00112 #include /**/ "ace/post.h"
00113 #endif /* TAO_DII_REPLY_HANDLER_H */

Generated on Tue Feb 2 17:43:23 2010 for TAO_DynamicInterface by  doxygen 1.4.7