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