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