MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / main

Method main

java/tests/hello/Client.java:10–38  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

8public class Client {
9
10 public static void main(String[] args) {
11 org.omg.CORBA.StringSeqHolder args_holder =
12 new org.omg.CORBA.StringSeqHolder(args);
13 i2jrt.ORB orb = i2jrt.ORB.init(args_holder);
14
15 if (orb == null) {
16 System.err.println("ERROR: Failed to init ORB");
17 System.exit(-1);
18 }
19
20 if (args_holder.value.length < 2 || !"-k".equals(args_holder.value[0])) {
21 System.err.println("usage: Client -k <ior>");
22 System.exit(-1);
23 }
24
25 String ior = args_holder.value[1];
26 org.omg.CORBA.Object obj = orb.string_to_object(ior);
27 Test.Hello hello = Test.HelloHelper.narrow(obj);
28 if (hello == null) {
29 System.err.println("ERROR: couldn't get the Hello object reference");
30 System.exit(-1);
31 }
32
33 String the_string = hello.get_string();
34 System.out.println ("Hello Client - get_string returned <" + the_string
35 + ">");
36 hello.shutdown();
37 orb.destroy();
38 }
39}

Callers

nothing calls this directly

Calls 6

string_to_objectMethod · 0.80
initMethod · 0.45
equalsMethod · 0.45
get_stringMethod · 0.45
shutdownMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected