Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / default_server.h
blob3f61e85c2c698e973b8ea7187973e944a05b09f1
1 //=============================================================================
2 /**
3 * @file default_server.h
5 * @author Chris Cleeland
6 */
7 //=============================================================================
9 #ifndef TAO_DEFAULT_SERVER_FACTORY_H
10 #define TAO_DEFAULT_SERVER_FACTORY_H
12 #include /**/ "ace/pre.h"
14 #include "tao/Server_Strategy_Factory.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ace/Service_Config.h"
21 #include "ace/Time_Value.h"
23 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
25 /**
26 * @class TAO_Default_Server_Strategy_Factory
28 * @brief This is the default strategy factory for CORBA servers. It
29 * allows developers to choose strategies via argument flags.
30 * This design gives substantial freedom for experimentation.
32 class TAO_Export TAO_Default_Server_Strategy_Factory
33 : public TAO_Server_Strategy_Factory
35 public:
36 TAO_Default_Server_Strategy_Factory ();
37 virtual ~TAO_Default_Server_Strategy_Factory ();
39 // = Service Configurator hooks.
40 virtual int init (int argc, ACE_TCHAR* argv[]);
42 // = The TAO_Server_Strategy_Factory methods, please read the
43 // documentation in "tao/Server_Strategy_Factory.h"
44 virtual int open (TAO_ORB_Core*);
45 virtual int activate_server_connections ();
46 virtual int thread_per_connection_timeout (ACE_Time_Value &timeout);
47 virtual int server_connection_thread_flags ();
48 virtual int server_connection_thread_count ();
50 /// Parse the arguments, check the documentation in
51 /// $TAO_ROOT/docs/Options.html for details
52 int parse_args (int argc, ACE_TCHAR* argv[]);
54 protected:
55 void tokenize (ACE_TCHAR* flag_string);
57 void report_option_value_error (const ACE_TCHAR* option_name,
58 const ACE_TCHAR* option_value);
60 protected:
61 /// Should the server connection handlers run in their own thread?
62 int activate_server_connections_;
64 /// Default thread flags passed to thr_create().
65 int thread_flags_;
67 /// The timeout flag and value for the thread-per-connection model
68 int thread_per_connection_use_timeout_;
69 ACE_Time_Value thread_per_connection_timeout_;
72 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_Default_Server_Strategy_Factory)
73 ACE_FACTORY_DECLARE (TAO, TAO_Default_Server_Strategy_Factory)
75 TAO_END_VERSIONED_NAMESPACE_DECL
77 #include /**/ "ace/post.h"
78 #endif /* TAO_DEFAULT_SERVER_FACTORY_H */