00001
00002
00003
00004
00005
00006
00007
00008
00009
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
00023
00024 #include "tao/Client_Strategy_Factory.h"
00025
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class TAO_Export TAO_Default_Client_Strategy_Factory
00037 : public TAO_Client_Strategy_Factory
00038 {
00039 public:
00040
00041
00042 TAO_Default_Client_Strategy_Factory (void);
00043
00044
00045 virtual ~TAO_Default_Client_Strategy_Factory (void);
00046
00047
00048
00049 virtual int init (int argc, ACE_TCHAR* argv[]);
00050
00051
00052 int parse_args (int argc, ACE_TCHAR* argv[]);
00053
00054
00055
00056 virtual ACE_Lock* create_profile_lock (void);
00057 virtual TAO_Configurable_Refcount create_profile_refcount (void);
00058 virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport);
00059 virtual ACE_Lock *create_transport_mux_strategy_lock (void);
00060 virtual int reply_dispatcher_table_size (void) const;
00061 virtual int allow_callback (void);
00062 virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport);
00063 virtual TAO_Connect_Strategy *create_connect_strategy (TAO_ORB_Core *);
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
00079 Lock_Type profile_lock_type_;
00080
00081 enum Transport_Mux_Strategy
00082 {
00083 TAO_MUXED_TMS,
00084 TAO_EXCLUSIVE_TMS
00085 };
00086
00087
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
00099 Wait_Strategy wait_strategy_;
00100
00101
00102 Connect_Strategy connect_strategy_;
00103
00104
00105 int rd_table_size_;
00106
00107
00108 Lock_Type muxed_strategy_lock_type_;
00109
00110
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