ClientRequestInterceptor_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ClientRequestInterceptor_Adapter.h
00006  *
00007  *  ClientRequestInterceptor_Adapter.h,v 1.13 2006/03/10 07:19:05 jtc Exp
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 "ace/CORBA_macros.h"
00030 #include "tao/SystemException.h"
00031 #include "tao/Invocation_Utils.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 class TAO_ClientRequestInfo;
00036 
00037 namespace PortableInterceptor
00038 {
00039   class ClientRequestInterceptor;
00040   typedef ClientRequestInterceptor *ClientRequestInterceptor_ptr;
00041 
00042   typedef CORBA::Short ReplyStatus;
00043 }
00044 
00045 namespace CORBA
00046 {
00047   class PolicyList;
00048 }
00049 
00050 namespace TAO
00051 {
00052   class Invocation_Base;
00053 
00054   /**
00055    * @class ClientRequestInterceptor_Adapter
00056    *
00057    * @brief A convenient helper class to invoke registered client request
00058    *        interceptors
00059    *
00060    * This class invokes all registered interceptors at interception
00061    * point, and enforces flow rules dictated by the Portable Interceptor
00062    * specification/chapter.
00063    */
00064   class TAO_Export ClientRequestInterceptor_Adapter
00065   {
00066   public:
00067     virtual ~ClientRequestInterceptor_Adapter (void);
00068 
00069     /**
00070      * @name PortableInterceptor Client Side Interception Points
00071      *
00072      * Each of these methods corresponds to a client side interception
00073      * point.  There are no "intermediate" interception points on the
00074      * client side, only "starting" and "ending" interception points.
00075      *
00076      */
00077     //@{
00078     /// This method implements one of the "starting" client side
00079     /// interception points.
00080     virtual void send_request (Invocation_Base &invocation
00081                                ACE_ENV_ARG_DECL) = 0;
00082 
00083     /// This method implements one of the "ending" client side
00084     /// interception point.
00085     virtual void receive_reply (Invocation_Base &invocation
00086                                 ACE_ENV_ARG_DECL) = 0;
00087 
00088     /// This method implements one of the "ending" client side
00089     /// interception point.
00090     virtual void receive_exception (Invocation_Base &invocation
00091                                     ACE_ENV_ARG_DECL) = 0;
00092 
00093     /// This method implements one of the "ending" client side
00094     /// interception point.
00095     virtual void receive_other (Invocation_Base &invocation
00096                                 ACE_ENV_ARG_DECL) = 0;
00097 
00098     /// Register an interceptor.
00099     virtual void add_interceptor (
00100       PortableInterceptor::ClientRequestInterceptor_ptr interceptor
00101       ACE_ENV_ARG_DECL) = 0;
00102 
00103     /// Register an interceptor with policies.
00104     virtual void add_interceptor (
00105       PortableInterceptor::ClientRequestInterceptor_ptr interceptor,
00106       const CORBA::PolicyList& policies
00107       ACE_ENV_ARG_DECL) = 0;
00108 
00109     virtual void destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL) = 0;
00110 
00111     /// Convert TAO Invocation status to a PI status
00112     virtual PortableInterceptor::ReplyStatus reply_status (
00113       TAO::Invocation_Base const &invocation_base) = 0;
00114   };
00115 
00116 }
00117 
00118 TAO_END_VERSIONED_NAMESPACE_DECL
00119 
00120 #include /**/ "ace/post.h"
00121 
00122 #endif /* TAO_CLIENT_REQUEST_INTERCEPTOR_ADAPTER_H */

Generated on Thu Nov 9 11:54:09 2006 for TAO by doxygen 1.3.6