Connector_Impl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   Connector_Impl.h
00006  *
00007  *  $Id: Connector_Impl.h 78931 2007-07-18 09:59:36Z johnnyw $
00008  *
00009  *  @author Balachandran Natarajan <bala@cs.wustl.edu>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_CONNECTOR_IMPL_H
00014 #define TAO_CONNECTOR_IMPL_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "ace/Strategies_T.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/Basic_Types.h"
00024 
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026 class ACE_Thread_Manager;
00027 ACE_END_VERSIONED_NAMESPACE_DECL
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 class TAO_ORB_Core;
00032 
00033 /**
00034  * @class TAO_Connect_Creation_Strategy
00035  *
00036  * @brief Creation strategy helper
00037  *
00038  * Creates the TAO_*_Connection_Handler object for the TAO_*_Connector
00039  * objects. This template class can now be used by all the Connector
00040  * objects instead of having to duplicate code. This class can be used
00041  * to set any required properties on the connection handlers at
00042  * creation time.
00043  *
00044  */
00045 
00046 template <class SVC_HANDLER>
00047 class TAO_Connect_Creation_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
00048 {
00049 public:
00050 
00051   /// Constructor.
00052   TAO_Connect_Creation_Strategy (ACE_Thread_Manager * = 0,
00053                                  TAO_ORB_Core* orb_core = 0);
00054 
00055   /// Makes TAO_*_Client_Connection_Handlers
00056   virtual int make_svc_handler (SVC_HANDLER *&sh);
00057 
00058 
00059 private:
00060 
00061   /// Pointer to the ORB_Core on which we are activated
00062   TAO_ORB_Core * const orb_core_;
00063 };
00064 
00065 
00066 
00067 /**
00068  * @class TAO_Connect_Concurrency_Strategy
00069  *
00070  * @brief Concurrency strategy helper
00071  *
00072  * Activates the Svc_Handler, and then if the correct wait strategy is
00073  * in use registers the handler with the reactor.
00074  *
00075  */
00076 
00077 template <class SVC_HANDLER>
00078 class TAO_Connect_Concurrency_Strategy :
00079   public ACE_Concurrency_Strategy<SVC_HANDLER>
00080 {
00081 public:
00082 
00083   /// Constructor.
00084   TAO_Connect_Concurrency_Strategy (TAO_ORB_Core *orb_core);
00085 
00086 
00087   /// Activates the Svc_Handler, and if the right wait strategy is in
00088   /// use, registers the handle with the reactor.
00089   int activate_svc_handler (SVC_HANDLER *svc_handler, void *arg);
00090 
00091 private:
00092 
00093   /// Pointer to the ORB Core.
00094   TAO_ORB_Core * const orb_core_;
00095 };
00096 
00097 TAO_END_VERSIONED_NAMESPACE_DECL
00098 
00099 
00100 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00101 #include "tao/Connector_Impl.cpp"
00102 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00103 
00104 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00105 #pragma implementation ("Connector_Impl.cpp")
00106 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00107 
00108 #include /**/ "ace/post.h"
00109 #endif /*TAO_CONNECTOR_IMPL_H*/

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