3 //=============================================================================
5 * @file default_client.h
7 * @author Chris Cleeland
9 //=============================================================================
12 #ifndef TAO_DEFAULT_CLIENT_H
13 #define TAO_DEFAULT_CLIENT_H
15 #include /**/ "ace/pre.h"
16 #include "ace/Service_Config.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/Client_Strategy_Factory.h"
23 #include "tao/Invocation_Retry_Params.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
28 * @class TAO_Default_Client_Strategy_Factory
30 * @brief This is the "default" client strategy factor for TAO. It
31 * includes strategies that are configured through command-line
32 * options so that everything operates as if there were no
33 * dynamically-linkable strategies.
35 class TAO_Export TAO_Default_Client_Strategy_Factory
36 : public TAO_Client_Strategy_Factory
40 TAO_Default_Client_Strategy_Factory ();
43 virtual ~TAO_Default_Client_Strategy_Factory ();
45 // = Service Configurator hooks.
46 /// Dynamic linking hook
47 virtual int init (int argc
, ACE_TCHAR
* argv
[]);
49 /// Parse svc.conf arguments
50 int parse_args (int argc
, ACE_TCHAR
* argv
[]);
52 // = Check Client_Strategy_Factory.h for the documentation of the
54 virtual TAO_Transport_Mux_Strategy
*create_transport_mux_strategy (TAO_Transport
*transport
);
55 virtual ACE_Lock
*create_transport_mux_strategy_lock ();
56 virtual int reply_dispatcher_table_size () const;
57 virtual int allow_callback ();
58 virtual TAO_Wait_Strategy
*create_wait_strategy (TAO_Transport
*transport
);
59 virtual TAO_Connect_Strategy
*create_connect_strategy (TAO_ORB_Core
*);
60 virtual bool use_cleanup_options () const;
61 virtual Connect_Strategy
connect_strategy () const;
62 virtual const TAO::Invocation_Retry_Params
&invocation_retry_params () const;
63 virtual Messaging::SyncScope
sync_scope () const;
66 void report_option_value_error (const ACE_TCHAR
* option_name
,
67 const ACE_TCHAR
* option_value
);
76 enum Transport_Mux_Strategy
82 /// The client Request Mux Strategy.
83 Transport_Mux_Strategy transport_mux_strategy_
;
87 TAO_WAIT_ON_LEADER_FOLLOWER
,
90 TAO_WAIT_ON_LF_NO_UPCALL
93 /// The wait-for-reply strategy.
94 Wait_Strategy wait_strategy_
;
96 /// The connection initiation strategy.
97 Connect_Strategy connect_strategy_
;
99 /// Size of the reply dispatcher table
102 /// Type of lock for the muxed_strategy
103 Lock_Type muxed_strategy_lock_type_
;
105 /// Cleanupoptions for RW strategy
106 bool use_cleanup_options_
;
108 /// Retry options when exceptions occur
109 TAO::Invocation_Retry_Params invocation_retry_params_
;
111 /// The default sync scope used with oneways when a policy does not
113 Messaging::SyncScope sync_scope_
;
116 ACE_STATIC_SVC_DECLARE_EXPORT (TAO
, TAO_Default_Client_Strategy_Factory
)
117 ACE_FACTORY_DECLARE (TAO
, TAO_Default_Client_Strategy_Factory
)
119 TAO_END_VERSIONED_NAMESPACE_DECL
121 #include /**/ "ace/post.h"
122 #endif /* TAO_DEFAULT_CLIENT_H */