ServerRequestInterceptor_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ServerRequestInterceptor_Adapter.h
00006  *
00007  *  ServerRequestInterceptor_Adapter.h,v 1.9 2006/06/26 09:24:20 sma Exp
00008  *
00009  *   This file an adapter class to simplify the support of
00010  *   interceptors.
00011  *
00012  *  @author  Johnny Willemsen  <jwillemsen@remedy.nl>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H
00017 #define TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "tao/TAO_Export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/CORBA_macros.h"
00028 #include "tao/SystemException.h"
00029 
00030 #if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
00031 # include "tao/OctetSeqC.h"
00032 #endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
00033 
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035 
00036 namespace PortableInterceptor
00037 {
00038   class ServerRequestInterceptor;
00039   typedef ServerRequestInterceptor *ServerRequestInterceptor_ptr;
00040 
00041   typedef CORBA::Short ReplyStatus;
00042 }
00043 
00044 namespace CORBA
00045 {
00046   class PolicyList;
00047 }
00048 
00049 class TAO_ServerRequest;
00050 
00051 namespace TAO
00052 {
00053   class ServerRequestInfo;
00054   class Argument;
00055   class PICurrent_Impl;
00056   class Upcall_Command;
00057 
00058   /**
00059    * @class ServerRequestInterceptor_Adapter
00060    */
00061   class TAO_Export ServerRequestInterceptor_Adapter
00062   {
00063   public:
00064     virtual ~ServerRequestInterceptor_Adapter (void);
00065 
00066     /**
00067      * @name PortableInterceptor Server Side Interception Points
00068      *
00069      * Each of these methods corresponds to a client side interception
00070      * point.
00071      */
00072     //@{
00073 #if TAO_HAS_EXTENDED_FT_INTERCEPTORS == 1
00074     /// This method implements the "starting" server side interception
00075     /// point. It will be used as the first interception point and it is
00076     /// proprietary to TAO.
00077     /// @@ Will go away once Bug 1369 is fixed
00078     virtual void tao_ft_interception_point (
00079         TAO_ServerRequest &server_request,
00080         TAO::Argument * const args[],
00081         size_t nargs,
00082         void * servant_upcall,
00083         CORBA::TypeCode_ptr const * exceptions,
00084         CORBA::ULong nexceptions,
00085         CORBA::OctetSeq_out oc
00086         ACE_ENV_ARG_DECL) = 0;
00087 #endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
00088 
00089     /// This method implements the "intermediate" server side
00090     /// interception point if the above #ifdef is set to 1 and a
00091     /// starting intercetion point if it is not set to 1.
00092     ///
00093     /// @note This method should have been the "starting" interception
00094     ///       point according to the interceptor spec. This will be
00095     ///       fixed once Bug 1369 is completely done.
00096     virtual void receive_request_service_contexts (
00097         TAO_ServerRequest &server_request,
00098         TAO::Argument * const args[],
00099         size_t nargs,
00100         void * servant_upcall,
00101         CORBA::TypeCode_ptr const * exceptions,
00102         CORBA::ULong nexceptions
00103         ACE_ENV_ARG_DECL) = 0;
00104 
00105     /// This method an "intermediate" server side interception point.
00106     virtual void receive_request (
00107         TAO_ServerRequest &server_request,
00108         TAO::Argument * const args[],
00109         size_t nargs,
00110         void * servant_upcall,
00111         CORBA::TypeCode_ptr const * exceptions,
00112         CORBA::ULong nexceptions
00113         ACE_ENV_ARG_DECL) = 0;
00114 
00115     /// This method implements one of the "ending" server side
00116     /// interception points.
00117     virtual void send_reply (
00118         TAO_ServerRequest &server_request,
00119         TAO::Argument * const args[],
00120         size_t nargs,
00121         void * servant_upcall,
00122         CORBA::TypeCode_ptr const * exceptions,
00123         CORBA::ULong nexceptions
00124         ACE_ENV_ARG_DECL) = 0;
00125 
00126     /// This method implements one of the "ending" server side
00127     /// interception points.
00128     virtual void send_exception (
00129         TAO_ServerRequest &server_request,
00130         TAO::Argument * const args[],
00131         size_t nargs,
00132         void * servant_upcall,
00133         CORBA::TypeCode_ptr const * exceptions,
00134         CORBA::ULong nexceptions
00135         ACE_ENV_ARG_DECL) = 0;
00136 
00137     /// This method implements one of the "ending" server side
00138     /// interception points.
00139     virtual void send_other (
00140         TAO_ServerRequest &server_request,
00141         TAO::Argument * const args[],
00142         size_t nargs,
00143         void * servant_upcall,
00144         CORBA::TypeCode_ptr const * exceptions,
00145         CORBA::ULong nexceptions
00146         ACE_ENV_ARG_DECL) = 0;
00147     //@}
00148 
00149     /// Register an interceptor.
00150     virtual void add_interceptor (
00151       PortableInterceptor::ServerRequestInterceptor_ptr interceptor
00152       ACE_ENV_ARG_DECL) = 0;
00153 
00154     /// Register an interceptor with policies.
00155     virtual void add_interceptor (
00156       PortableInterceptor::ServerRequestInterceptor_ptr interceptor,
00157       const CORBA::PolicyList& policies
00158       ACE_ENV_ARG_DECL) = 0;
00159 
00160     virtual void destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL) = 0;
00161 
00162     virtual TAO::PICurrent_Impl *allocate_pi_current (void) = 0;
00163 
00164     virtual void deallocate_pi_current (
00165         TAO::PICurrent_Impl *picurrent) = 0;
00166 
00167     virtual void execute_command (
00168         TAO_ServerRequest &server_request,
00169         TAO::Upcall_Command &command
00170         ACE_ENV_ARG_DECL) = 0;
00171   };
00172 }
00173 
00174 TAO_END_VERSIONED_NAMESPACE_DECL
00175 
00176 #include /**/ "ace/post.h"
00177 
00178 #endif /* TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H */

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