default_client.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     default_client.h
00006  *
00007  *  default_client.h,v 1.50 2006/04/26 17:12:48 mesnier_p Exp
00008  *
00009  *  @author  Chris Cleeland
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_DEFAULT_CLIENT_H
00015 #define TAO_DEFAULT_CLIENT_H
00016 
00017 #include /**/ "ace/pre.h"
00018 #include "ace/Service_Config.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Client_Strategy_Factory.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /**
00029  * @class TAO_Default_Client_Strategy_Factory
00030  *
00031  * @brief This is the "default" client strategy factor for TAO.  It
00032  * includes strategies that are configured through command-line
00033  * options so that everything operates as if there were no
00034  * dynamically-linkable strategies.
00035  */
00036 class TAO_Export TAO_Default_Client_Strategy_Factory
00037   : public TAO_Client_Strategy_Factory
00038 {
00039 public:
00040   // = Initialization and termination methods.
00041   /// Constructor.
00042   TAO_Default_Client_Strategy_Factory (void);
00043 
00044   /// Destructor.
00045   virtual ~TAO_Default_Client_Strategy_Factory (void);
00046 
00047   // = Service Configurator hooks.
00048   /// Dynamic linking hook
00049   virtual int init (int argc, ACE_TCHAR* argv[]);
00050 
00051   /// Parse svc.conf arguments
00052   int parse_args (int argc, ACE_TCHAR* argv[]);
00053 
00054   // = Check Client_Strategy_Factory.h for the documentation of the
00055   //   following methods.
00056   virtual ACE_Lock* create_profile_lock (void);
00057   virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport);
00058   virtual ACE_Lock *create_transport_mux_strategy_lock (void);
00059   virtual int reply_dispatcher_table_size (void) const;
00060   virtual int allow_callback (void);
00061   virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport);
00062   virtual TAO_Connect_Strategy *create_connect_strategy (TAO_ORB_Core *);
00063   virtual ACE_Lock *create_ft_service_retention_id_lock (void);
00064   virtual bool use_cleanup_options (void) const;
00065   virtual Connect_Strategy connect_strategy (void) const;
00066 
00067 protected:
00068   void report_option_value_error (const ACE_TCHAR* option_name,
00069                                   const ACE_TCHAR* option_value);
00070 
00071 private:
00072   enum Lock_Type
00073   {
00074     TAO_NULL_LOCK,
00075     TAO_THREAD_LOCK
00076   };
00077 
00078   /// the lock type for forwarding IIOP Profile
00079   Lock_Type profile_lock_type_;
00080 
00081   enum Transport_Mux_Strategy
00082   {
00083     TAO_MUXED_TMS,
00084     TAO_EXCLUSIVE_TMS
00085   };
00086 
00087   /// The client Request Mux Strategy.
00088   Transport_Mux_Strategy transport_mux_strategy_;
00089 
00090   enum Wait_Strategy
00091   {
00092     TAO_WAIT_ON_LEADER_FOLLOWER,
00093     TAO_WAIT_ON_REACTOR,
00094     TAO_WAIT_ON_READ,
00095     TAO_WAIT_ON_LF_NO_UPCALL
00096   };
00097 
00098   /// The wait-for-reply strategy.
00099   Wait_Strategy wait_strategy_;
00100 
00101   /// The connection initiation strategy.
00102   Connect_Strategy connect_strategy_;
00103 
00104   /// Size of the reply dispatcher table
00105   int rd_table_size_;
00106 
00107   /// Type of lock for the muxed_strategy
00108   Lock_Type muxed_strategy_lock_type_;
00109 
00110   /// Cleanupoptions for RW strategy
00111   bool use_cleanup_options_;
00112 };
00113 
00114 TAO_END_VERSIONED_NAMESPACE_DECL
00115 
00116 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_Default_Client_Strategy_Factory)
00117 ACE_FACTORY_DECLARE (TAO, TAO_Default_Client_Strategy_Factory)
00118 
00119 #include /**/ "ace/post.h"
00120 #endif /* TAO_DEFAULT_CLIENT_H */

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