Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / examples / Simulator / DOVEBrowser / DOVEBrowser.java
blobc6b27dff6628d6952b7872b24c7d7adfc035b4b5
1 //
2 // = FILENAME
3 // DOVEBrowser.java
4 //
5 // = AUTHOR
6 // Michael Kircher (mk1@cs.wustl.edu)
7 //
8 // = DESCRIPTION
9 // Entry point for the demo.
11 // ============================================================================
14 import java.awt.*;
16 public class DOVEBrowser {
18 DemoCore demoCore_;
20 public DOVEBrowser () {
21 super ();
24 public void init (String nameServiceIOR, String nameServicePort,
25 String[] args, boolean use_queueing) {
27 demoCore_ = new DemoCore (nameServiceIOR,
28 nameServicePort,
29 args,
30 use_queueing,
31 null);
32 demoCore_.show ();
33 demoCore_.run ();
36 public static void main (String[] args) {
37 String nameServiceIOR = null;
38 String nameServicePort = null;
39 boolean use_queueing = false;
40 int arg_index = 0;
42 // Loop through command line arguments, acting on relevant options
43 while (args.length > arg_index)
45 System.out.println ("args.length [" + args.length + "] arg_index [" +
46 arg_index + "]");
47 // Set the name service IOR
48 if (args[arg_index].equals ("-queue"))
50 ++arg_index;
51 use_queueing = true;
53 else if ((args[arg_index].equals ("-nameserviceior")) &&
54 (args.length > arg_index + 1))
56 System.out.println ("switch [" + args[arg_index] + "]");
57 System.out.println ("value [" + args[arg_index + 1] + "]");
58 nameServiceIOR = args[arg_index + 1];
59 System.out.println ("nameServiceIOR [" + nameServiceIOR + "]");
60 arg_index += 2;
62 // Set the name service port
63 else if ((args[arg_index].equals ("-nameserviceport")) &&
64 (args.length > arg_index + 1))
66 System.out.println ("switch [" + args[arg_index] + "]");
67 System.out.println ("value [" + args[arg_index + 1] + "]");
68 nameServicePort = args[arg_index + 1];
69 System.out.println ("nameServicePort [" + nameServicePort + "]");
70 arg_index += 2;
72 // Skip over anything else
73 else
75 System.out.println ("Skipping [" + args[arg_index] + "]");
76 arg_index ++;
80 DOVEBrowser doveBrowser = new DOVEBrowser();
81 doveBrowser.init (nameServiceIOR, nameServicePort, args, use_queueing);