1 package CosTime;
2
3
4 /**
* CosTime/TimeServicePOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from time.idl
* Freitag, 18. April 2003 11.06 Uhr CEST
*/
5
6 public abstract class TimeServicePOA extends org.omg.PortableServer.Servant
7 implements CosTime.TimeServiceOperations, org.omg.CORBA.portable.InvokeHandler
8 {
9
10 // Constructors
11
12 private static java.util.Hashtable _methods = new java.util.Hashtable ();
13 static
14 {
15 _methods.put ("universal_time", new java.lang.Integer (0));
16 _methods.put ("secure_universal_time", new java.lang.Integer (1));
17 _methods.put ("new_universal_time", new java.lang.Integer (2));
18 _methods.put ("uto_from_utc", new java.lang.Integer (3));
19 }
20
21 public org.omg.CORBA.portable.OutputStream _invoke (String ===>$<===method,
22 org.omg.CORBA.portable.InputStream in,
23 org.omg.CORBA.portable.ResponseHandler ===>$<===rh)
24 {
25 org.omg.CORBA.portable.OutputStream out = null;
26 java.lang.Integer __method = (java.lang.Integer)_methods.get (===>$<===method);
27 if (__method == null)
28 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
29
30 switch (__method.intValue ())
31 {
32 case 0: // CosTime/TimeService/universal_time
33 {
34 try {
35 CosTime.UTO ===>$<===result = null;
36 ===>$<===result = this.universal_time ();
37 out = ===>$<===rh.createReply();
38 CosTime.UTOHelper.write (out, ===>$<===result);
39 } catch (CosTime.TimeUnavailable ===>$<===ex) {
40 out = ===>$<===rh.createExceptionReply ();
41 CosTime.TimeUnavailableHelper.write (out, ===>$<===ex);
42 }
43 break;
44 }
45
46 case 1: // CosTime/TimeService/secure_universal_time
47 {
48 try {
49 CosTime.UTO ===>$<===result = null;
50 ===>$<===result = this.secure_universal_time ();
51 out = ===>$<===rh.createReply();
52 CosTime.UTOHelper.write (out, ===>$<===result);
53 } catch (CosTime.TimeUnavailable ===>$<===ex) {
54 out = ===>$<===rh.createExceptionReply ();
55 CosTime.TimeUnavailableHelper.write (out, ===>$<===ex);
56 }
57 break;
58 }
59
60 case 2: // CosTime/TimeService/new_universal_time
61 {
62 long time = TimeBase.TimeTHelper.read (in);
63 long inaccuracy = TimeBase.InaccuracyTHelper.read (in);
64 CosTime.UTO ===>$<===result = null;
65 ===>$<===result = this.new_universal_time (time, inaccuracy);
66 out = ===>$<===rh.createReply();
67 CosTime.UTOHelper.write (out, ===>$<===result);
68 break;
69 }
70
71 case 3: // CosTime/TimeService/uto_from_utc
72 {
73 TimeBase.UtcT utc = TimeBase.UtcTHelper.read (in);
74 CosTime.UTO ===>$<===result = null;
75 ===>$<===result = this.uto_from_utc (utc);
76 out = ===>$<===rh.createReply();
77 CosTime.UTOHelper.write (out, ===>$<===result);
78 break;
79 }
80
81 default:
82 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
83 }
84
85 return out;
86 } // _invoke
87
88 // Type-specific CORBA::Object operations
89 private static String[] __ids = {
90 "IDL:hpi.uni-potsdam.de/CosTime/TimeService:1.0"};
91
92 public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
93 {
94 return (String[])__ids.clone ();
95 }
96
97 public TimeService _this()
98 {
99 return TimeServiceHelper.narrow(
100 super._this_object());
101 }
102
103 public TimeService _this(org.omg.CORBA.ORB orb)
104 {
105 return TimeServiceHelper.narrow(
106 super._this_object(orb));
107 }
108
109
110 } // class TimeServicePOA
111