3 //=============================================================================
5 * @file Server_Strategy_Factory.h
7 * @author Chris Cleeland
9 //=============================================================================
11 #ifndef TAO_SERVER_STRATEGY_FACTORY_H
12 #define TAO_SERVER_STRATEGY_FACTORY_H
14 #include /**/ "ace/pre.h"
16 #include "ace/Service_Object.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include /**/ "tao/TAO_Export.h"
23 #include "tao/Basic_Types.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 enum TAO_Demux_Strategy
38 * @class TAO_Server_Strategy_Factory
40 * @brief Base class for the server's abstract factory that manufactures
41 * various strategies of special utility to it. This simply
42 * serves as an interface to a subclass that REALLY gets
43 * specified and loaded by the Service Configurator.
45 class TAO_Export TAO_Server_Strategy_Factory
: public ACE_Service_Object
48 struct Active_Object_Map_Creation_Parameters
51 Active_Object_Map_Creation_Parameters ();
53 /// Default size of object lookup table.
54 CORBA::ULong active_object_map_size_
;
56 /// The type of lookup/demultiplexing strategy being used for user
58 TAO_Demux_Strategy object_lookup_strategy_for_user_id_policy_
;
60 /// The type of lookup/demultiplexing strategy being used for
62 TAO_Demux_Strategy object_lookup_strategy_for_system_id_policy_
;
64 /// The type of reverse lookup/demultiplexing strategy being used
65 /// for the UNIQUE_ID policy
66 TAO_Demux_Strategy reverse_object_lookup_strategy_for_unique_id_policy_
;
68 /// Flag to indicate whether the active hint should be used with
70 int use_active_hint_in_ids_
;
72 /// Flag to indicate whether reactivations of servants was required
73 /// (under the system id policy). If not, certain resources may
75 int allow_reactivation_of_system_ids_
;
77 CORBA::ULong poa_map_size_
;
79 TAO_Demux_Strategy poa_lookup_strategy_for_transient_id_policy_
;
81 TAO_Demux_Strategy poa_lookup_strategy_for_persistent_id_policy_
;
83 int use_active_hint_in_poa_names_
;
87 TAO_Server_Strategy_Factory ();
90 virtual ~TAO_Server_Strategy_Factory();
93 * Call <open> on various strategies. This is not performed in
94 * <init> so that the other portions of the ORB have a chance to
95 * "settle" in their initialization since the strategies herein
96 * might need some of that information.
98 virtual int open (TAO_ORB_Core
* orb_core
) = 0;
100 /// Are server connections active (i.e. run in their own thread)
101 virtual int activate_server_connections () = 0;
104 * Obtain the timeout value used by the thread-per-connection server
105 * threads to poll the shutdown flag in the ORB.
106 * Return -1 if the ORB should use the compile-time defaults.
107 * If the return value is zero then the threads block without
110 virtual int thread_per_connection_timeout (ACE_Time_Value
&timeout
) = 0;
112 /// The thread activation parameters
113 virtual int server_connection_thread_flags () = 0;
114 virtual int server_connection_thread_count () = 0;
116 /// Return the active object map creation parameters.
118 const Active_Object_Map_Creation_Parameters
&
119 active_object_map_creation_parameters () const;
122 /// Active object map creation parameters.
123 Active_Object_Map_Creation_Parameters active_object_map_creation_parameters_
;
126 TAO_END_VERSIONED_NAMESPACE_DECL
128 #include /**/ "ace/post.h"
130 #endif /* TAO_SERVER_STRATEGY_FACTORY_H */