RequestProcessingStrategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file RequestProcessingStrategy.h
00006  *
00007  *  $Id: RequestProcessingStrategy.h 80572 2008-02-05 20:02:46Z johnnyw $
00008  *
00009  *  @author  Johnny Willemsen  <jwillemsen@remedy.nl>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_REQUEST_PROCESSING_STRATEGY_H
00014 #define TAO_REQUEST_PROCESSING_STRATEGY_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "tao/PortableServer/Policy_Strategy.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/PortableServer/PortableServer.h"
00024 #include "tao/PortableServer/Servant_Location.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 namespace PortableServer
00029 {
00030   class ServantManager;
00031   typedef ServantManager *ServantManager_ptr;
00032 }
00033 
00034 namespace TAO
00035 {
00036   namespace Portable_Server
00037   {
00038     class Servant_Upcall;
00039     class POA_Current_Impl;
00040   }
00041 }
00042 
00043 class TAO_Root_POA;
00044 
00045 namespace TAO
00046 {
00047   namespace Portable_Server
00048   {
00049     class RequestProcessingStrategy
00050       : public Policy_Strategy
00051     {
00052     public:
00053       RequestProcessingStrategy (void);
00054 
00055       virtual void strategy_init(TAO_Root_POA *poa);
00056 
00057       virtual void strategy_init(
00058         TAO_Root_POA *poa,
00059         ::PortableServer::ServantRetentionPolicyValue);
00060 
00061       virtual void strategy_cleanup(void);
00062 
00063 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00064 
00065       virtual PortableServer::ServantManager_ptr get_servant_manager (void) = 0;
00066 
00067       virtual void set_servant_manager (
00068         PortableServer::ServantManager_ptr imgr) = 0;
00069 
00070       virtual void set_servant (PortableServer::Servant servant) = 0;
00071 
00072       virtual PortableServer::Servant get_servant (void) = 0;
00073 
00074 #endif /* TAO_HAS_MINIMUM_POA == 0 !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) */
00075 
00076       virtual TAO_SERVANT_LOCATION locate_servant (
00077         const PortableServer::ObjectId &system_id,
00078         PortableServer::Servant &servant) = 0;
00079 
00080       virtual PortableServer::Servant locate_servant (
00081         const char *operation,
00082         const PortableServer::ObjectId &system_id,
00083         TAO::Portable_Server::Servant_Upcall &servant_upcall,
00084         TAO::Portable_Server::POA_Current_Impl &poa_current_impl,
00085         bool &wait_occurred_restart_call) = 0;
00086 
00087       virtual void cleanup_servant (
00088         PortableServer::Servant servant,
00089         const PortableServer::ObjectId &user_id) = 0;
00090 
00091       virtual PortableServer::Servant system_id_to_servant (
00092         const PortableServer::ObjectId &system_id) = 0;
00093 
00094       virtual PortableServer::Servant id_to_servant (
00095         const PortableServer::ObjectId &id) = 0;
00096 
00097       virtual void etherealize_objects (CORBA::Boolean etherealize_objects) = 0;
00098 
00099       virtual PortableServer::ObjectId *servant_to_id (
00100         PortableServer::Servant servant) = 0;
00101 
00102       virtual void post_invoke_servant_cleanup(
00103         const PortableServer::ObjectId &system_id,
00104         const TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0;
00105 
00106       virtual ::PortableServer::RequestProcessingPolicyValue type() const = 0;
00107 
00108       virtual ::PortableServer::ServantRetentionPolicyValue sr_type() const;
00109 
00110     protected:
00111       TAO_Root_POA* poa_;
00112       ::PortableServer::ServantRetentionPolicyValue sr_value_;
00113     };
00114   }
00115 }
00116 
00117 TAO_END_VERSIONED_NAMESPACE_DECL
00118 
00119 #include /**/ "ace/post.h"
00120 #endif /* TAO_REQUEST_PROCESSING_STRATEGY_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7