ServerRequestInterceptor_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ServerRequestInterceptor_Adapter.h
00006  *
00007  *  $Id: ServerRequestInterceptor_Adapter.h 76995 2007-02-11 12:51:42Z johnnyw $
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 "tao/orbconf.h"
00028 #include "tao/Basic_Types.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) = 0;
00086 #endif /*TAO_HAS_EXTENDED_FT_INTERCEPTORS*/
00087 
00088     /// This method implements the "intermediate" server side
00089     /// interception point if the above #ifdef is set to 1 and a
00090     /// starting intercetion point if it is not set to 1.
00091     ///
00092     /// @note This method should have been the "starting" interception
00093     ///       point according to the interceptor spec. This will be
00094     ///       fixed once Bug 1369 is completely done.
00095     virtual void receive_request_service_contexts (
00096         TAO_ServerRequest &server_request,
00097         TAO::Argument * const args[],
00098         size_t nargs,
00099         void * servant_upcall,
00100         CORBA::TypeCode_ptr const * exceptions,
00101         CORBA::ULong nexceptions) = 0;
00102 
00103     /// This method an "intermediate" server side interception point.
00104     virtual void receive_request (
00105         TAO_ServerRequest &server_request,
00106         TAO::Argument * const args[],
00107         size_t nargs,
00108         void * servant_upcall,
00109         CORBA::TypeCode_ptr const * exceptions,
00110         CORBA::ULong nexceptions) = 0;
00111 
00112     /// This method implements one of the "ending" server side
00113     /// interception points.
00114     virtual void send_reply (
00115         TAO_ServerRequest &server_request,
00116         TAO::Argument * const args[],
00117         size_t nargs,
00118         void * servant_upcall,
00119         CORBA::TypeCode_ptr const * exceptions,
00120         CORBA::ULong nexceptions) = 0;
00121 
00122     /// This method implements one of the "ending" server side
00123     /// interception points.
00124     virtual void send_exception (
00125         TAO_ServerRequest &server_request,
00126         TAO::Argument * const args[],
00127         size_t nargs,
00128         void * servant_upcall,
00129         CORBA::TypeCode_ptr const * exceptions,
00130         CORBA::ULong nexceptions) = 0;
00131 
00132     /// This method implements one of the "ending" server side
00133     /// interception points.
00134     virtual void send_other (
00135         TAO_ServerRequest &server_request,
00136         TAO::Argument * const args[],
00137         size_t nargs,
00138         void * servant_upcall,
00139         CORBA::TypeCode_ptr const * exceptions,
00140         CORBA::ULong nexceptions) = 0;
00141     //@}
00142 
00143     /// Register an interceptor.
00144     virtual void add_interceptor (
00145       PortableInterceptor::ServerRequestInterceptor_ptr interceptor) = 0;
00146 
00147     /// Register an interceptor with policies.
00148     virtual void add_interceptor (
00149       PortableInterceptor::ServerRequestInterceptor_ptr interceptor,
00150       const CORBA::PolicyList& policies
00151       ) = 0;
00152 
00153     virtual void destroy_interceptors (void) = 0;
00154 
00155     virtual TAO::PICurrent_Impl *allocate_pi_current (void) = 0;
00156 
00157     virtual void deallocate_pi_current (TAO::PICurrent_Impl *picurrent) = 0;
00158 
00159     virtual void execute_command (
00160         TAO_ServerRequest &server_request,
00161         TAO::Upcall_Command &command) = 0;
00162   };
00163 }
00164 
00165 TAO_END_VERSIONED_NAMESPACE_DECL
00166 
00167 #include /**/ "ace/post.h"
00168 
00169 #endif /* TAO_SERVER_REQUEST_INTERCEPTOR_ADAPTER_H */

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