3 //=============================================================================
5 * @file Client_Strategy_Factory.h
7 * @author Chris Cleeland <cleeland@cs.wustl.edu>
9 //=============================================================================
12 #ifndef TAO_CLIENT_STRATEGY_FACTORY_H
13 #define TAO_CLIENT_STRATEGY_FACTORY_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "tao/TAO_Export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include /**/ "tao/Versioned_Namespace.h"
24 #include "tao/Basic_Types.h"
26 #include "ace/Service_Object.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 ACE_END_VERSIONED_NAMESPACE_DECL
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 struct Invocation_Retry_Params
;
39 class TAO_Transport_Mux_Strategy
;
40 class TAO_Wait_Strategy
;
43 class TAO_Connect_Strategy
;
47 typedef ::CORBA::Short SyncScope
;
51 * @class TAO_Client_Strategy_Factory
53 * @brief Abstract factory used by the client to manufacture various
54 * strategies used on the client-side.
56 class TAO_Export TAO_Client_Strategy_Factory
: public ACE_Service_Object
60 virtual ~TAO_Client_Strategy_Factory ();
62 /// Create the correct client request muxing strategy.
63 virtual TAO_Transport_Mux_Strategy
*create_transport_mux_strategy (TAO_Transport
*transport
) = 0;
65 /// Create the correct lock for request muxing strategy.
66 virtual ACE_Lock
*create_transport_mux_strategy_lock () = 0;
68 /// Return the size of the reply dispatcher table
69 virtual int reply_dispatcher_table_size () const = 0;
71 /// Create the correct client wait_for_reply strategy.
72 virtual TAO_Wait_Strategy
*create_wait_strategy (TAO_Transport
*transport
) = 0;
74 /// Create the correct client asynch_connect strategy.
75 virtual TAO_Connect_Strategy
*create_connect_strategy (TAO_ORB_Core
*) = 0;
81 TAO_LEADER_FOLLOWER_CONNECT
84 /// Return the selected connection strategy option.
85 virtual Connect_Strategy
connect_strategy () const = 0;
87 /// Does the client allow any form of callback?
88 virtual int allow_callback () = 0;
90 /// Cleanup options for wait strategy.
92 * Only applicable to RW wait strategy
94 virtual bool use_cleanup_options () const = 0;
96 /// Return the parameters used to optionally retry invocation
97 /// after an exception occurs.
98 virtual const TAO::Invocation_Retry_Params
&invocation_retry_params () const = 0;
100 /// Return the value to be used as the default sync scope for the ORB
101 virtual Messaging::SyncScope
sync_scope () const = 0;
104 TAO_END_VERSIONED_NAMESPACE_DECL
106 #include /**/ "ace/post.h"
107 #endif /* TAO_CLIENT_STRATEGY_FACTORY_H */