studies/corba/Corba-Code1/server/CosTime/UTOPOA.java
⇒
download file
1 package CosTime;
2
3
4
5
6 public abstract class UTOPOA extends org.omg.PortableServer.Servant
7 implements CosTime.UTOOperations, org.omg.CORBA.portable.InvokeHandler
8 {
9
10
11
12 private static java.util.Hashtable _methods = new java.util.Hashtable ();
13 static
14 {
15 _methods.put ("_get_time", new java.lang.Integer (0));
16 _methods.put ("_get_inaccuracy", new java.lang.Integer (1));
17 _methods.put ("_get_utc_time", new java.lang.Integer (2));
18 _methods.put ("absolute_time", new java.lang.Integer (3));
19 _methods.put ("compare_time", new java.lang.Integer (4));
20 }
21
22 public org.omg.CORBA.portable.OutputStream _invoke (String ===>$<===method,
23 org.omg.CORBA.portable.InputStream in,
24 org.omg.CORBA.portable.ResponseHandler ===>$<===rh)
25 {
26 org.omg.CORBA.portable.OutputStream out = null;
27 java.lang.Integer __method = (java.lang.Integer)_methods.get (===>$<===method);
28 if (__method == null)
29 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
30
31 switch (__method.intValue ())
32 {
33 case 0:
34 {
35 long ===>$<===result = (long)0;
36 ===>$<===result = this.time ();
37 out = ===>$<===rh.createReply();
38 out.write_ulonglong (===>$<===result);
39 break;
40 }
41
42 case 1:
43 {
44 long ===>$<===result = (long)0;
45 ===>$<===result = this.inaccuracy ();
46 out = ===>$<===rh.createReply();
47 out.write_ulonglong (===>$<===result);
48 break;
49 }
50
51 case 2:
52 {
53 TimeBase.UtcT ===>$<===result = null;
54 ===>$<===result = this.utc_time ();
55 out = ===>$<===rh.createReply();
56 TimeBase.UtcTHelper.write (out, ===>$<===result);
57 break;
58 }
59
60 case 3:
61 {
62 CosTime.UTO ===>$<===result = null;
63 ===>$<===result = this.absolute_time ();
64 out = ===>$<===rh.createReply();
65 CosTime.UTOHelper.write (out, ===>$<===result);
66 break;
67 }
68
69 case 4:
70 {
71 CosTime.ComparisonType comparison_type = CosTime.ComparisonTypeHelper.read (in);
72 CosTime.UTO uto = CosTime.UTOHelper.read (in);
73 CosTime.TimeComparison ===>$<===result = null;
74 ===>$<===result = this.compare_time (comparison_type, uto);
75 out = ===>$<===rh.createReply();
76 CosTime.TimeComparisonHelper.write (out, ===>$<===result);
77 break;
78 }
79
80 default:
81 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
82 }
83
84 return out;
85 }
86
87
88 private static String[] __ids = {
89 "IDL:hpi.uni-potsdam.de/CosTime/UTO:1.0"};
90
91 public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
92 {
93 return (String[])__ids.clone ();
94 }
95
96 public UTO _this()
97 {
98 return UTOHelper.narrow(
99 super._this_object());
100 }
101
102 public UTO _this(org.omg.CORBA.ORB orb)
103 {
104 return UTOHelper.narrow(
105 super._this_object(orb));
106 }
107
108
109 }
110