ClientRequestInterceptor_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ClientRequestInterceptor_Adapter.h
00006  *
00007  *  $Id: ClientRequestInterceptor_Adapter.h 81145 2008-03-28 15:32:58Z vzykov $
00008  *
00009  *   This file an adapter class to simplify the support of
00010  *   interceptors.
00011  *
00012  *  @author  Nanbor Wang <nanbor@cs.wustl.edu>
00013  *  @author  Ossama Othman <ossama@uci.edu>
00014  *  @author  Kirthika Parameswaran  <kirthika@cs.wustl.edu>
00015  */
00016 //=============================================================================
00017 
00018 #ifndef TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H
00019 #define TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H
00020 
00021 #include /**/ "ace/pre.h"
00022 
00023 #include /**/ "tao/TAO_Export.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 #include "tao/Invocation_Utils.h"
00030 #include "tao/Basic_Types.h"
00031 
00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00033 
00034 class TAO_ClientRequestInfo;
00035 
00036 namespace PortableInterceptor
00037 {
00038   class ClientRequestInterceptor;
00039   typedef ClientRequestInterceptor *ClientRequestInterceptor_ptr;
00040 
00041   typedef CORBA::Short ReplyStatus;
00042 }
00043 
00044 namespace CORBA
00045 {
00046   class PolicyList;
00047 }
00048 
00049 namespace TAO
00050 {
00051   class Invocation_Base;
00052 
00053   /**
00054    * @class ClientRequestInterceptor_Adapter
00055    *
00056    * @brief A convenient helper class to invoke registered client request
00057    *        interceptors
00058    *
00059    * This class invokes all registered interceptors at interception
00060    * point, and enforces flow rules dictated by the Portable Interceptor
00061    * specification/chapter.
00062    */
00063   class TAO_Export ClientRequestInterceptor_Adapter
00064   {
00065   public:
00066     virtual ~ClientRequestInterceptor_Adapter (void);
00067 
00068     /**
00069      * @name PortableInterceptor Client Side Interception Points
00070      *
00071      * Each of these methods corresponds to a client side interception
00072      * point.  There are no "intermediate" interception points on the
00073      * client side, only "starting" and "ending" interception points.
00074      *
00075      */
00076     //@{
00077     /// This method implements one of the "starting" client side
00078     /// interception points.
00079     virtual void send_request (Invocation_Base &invocation) = 0;
00080 
00081     /// This method implements one of the "ending" client side
00082     /// interception point.
00083     virtual void receive_reply (Invocation_Base &invocation) = 0;
00084 
00085     /// This method implements one of the "ending" client side
00086     /// interception point.
00087     virtual void receive_exception (Invocation_Base &invocation) = 0;
00088 
00089     /// This method implements one of the "ending" client side
00090     /// interception point.
00091     virtual void receive_other (Invocation_Base &invocation) = 0;
00092 
00093     /// Register an interceptor.
00094     virtual void add_interceptor (
00095       PortableInterceptor::ClientRequestInterceptor_ptr interceptor) = 0;
00096 
00097     /// Register an interceptor with policies.
00098     virtual void add_interceptor (
00099       PortableInterceptor::ClientRequestInterceptor_ptr interceptor,
00100       const CORBA::PolicyList& policies) = 0;
00101 
00102     virtual void destroy_interceptors (void) = 0;
00103 
00104     /// Convert TAO Invocation status to a PI status
00105     virtual PortableInterceptor::ReplyStatus pi_reply_status (
00106       TAO::Invocation_Base const &invocation_base) = 0;
00107   };
00108 
00109 }
00110 
00111 TAO_END_VERSIONED_NAMESPACE_DECL
00112 
00113 #include /**/ "ace/post.h"
00114 
00115 #endif /* TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H */

Generated on Tue Feb 2 17:37:51 2010 for TAO by  doxygen 1.4.7