=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / examples / AMH / Sink_Server / st_server.cpp
blobe9eb93c6da2d200423840e791a4ae167a6d0bccd
1 #include "AMH_Servant.h"
2 #include "Base_Server.h"
4 void
5 usage (const char *message)
7 // @@ Mayur, what use is there in placing a space before a newline
8 // character?
9 //
10 // Mayur: It makes the newline stand out
12 static const char * usage =
13 "invoke as: st_server -o <ior_output_file>\n"
14 "-s <sleep_time (in microseconds)>\n";
16 ACE_ERROR ((LM_ERROR, "%s : %s", message, usage));
19 int
20 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
22 Base_Server amh_server (argc, argv);
23 amh_server.try_RT_scheduling();
24 amh_server.start_orb_and_poa ();
26 if (amh_server.parse_args () != 1)
28 usage ("IOR file missing\n");
29 ACE_OS::exit (1);
32 AMH_Servant servant (amh_server.orb ());
34 if (servant.parse_args (argc, argv) != 1)
36 usage ("Sleep time unspecified\n");
37 ACE_OS::exit (1);
40 amh_server.register_servant (&servant);
41 amh_server.run_event_loop ();
42 amh_server.shutdown_orb_and_poa ();
44 return 0;