package CosTime; /** * 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 */ public abstract class TimeServicePOA extends org.omg.PortableServer.Servant implements CosTime.TimeServiceOperations, org.omg.CORBA.portable.InvokeHandler { // Constructors private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("universal_time", new java.lang.Integer (0)); _methods.put ("secure_universal_time", new java.lang.Integer (1)); _methods.put ("new_universal_time", new java.lang.Integer (2)); _methods.put ("uto_from_utc", new java.lang.Integer (3)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { org.omg.CORBA.portable.OutputStream out = null; java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); if (__method == null) throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); switch (__method.intValue ()) { case 0: // CosTime/TimeService/universal_time { try { CosTime.UTO $result = null; $result = this.universal_time (); out = $rh.createReply(); CosTime.UTOHelper.write (out, $result); } catch (CosTime.TimeUnavailable $ex) { out = $rh.createExceptionReply (); CosTime.TimeUnavailableHelper.write (out, $ex); } break; } case 1: // CosTime/TimeService/secure_universal_time { try { CosTime.UTO $result = null; $result = this.secure_universal_time (); out = $rh.createReply(); CosTime.UTOHelper.write (out, $result); } catch (CosTime.TimeUnavailable $ex) { out = $rh.createExceptionReply (); CosTime.TimeUnavailableHelper.write (out, $ex); } break; } case 2: // CosTime/TimeService/new_universal_time { long time = TimeBase.TimeTHelper.read (in); long inaccuracy = TimeBase.InaccuracyTHelper.read (in); CosTime.UTO $result = null; $result = this.new_universal_time (time, inaccuracy); out = $rh.createReply(); CosTime.UTOHelper.write (out, $result); break; } case 3: // CosTime/TimeService/uto_from_utc { TimeBase.UtcT utc = TimeBase.UtcTHelper.read (in); CosTime.UTO $result = null; $result = this.uto_from_utc (utc); out = $rh.createReply(); CosTime.UTOHelper.write (out, $result); break; } default: throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); } return out; } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:hpi.uni-potsdam.de/CosTime/TimeService:1.0"}; public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) { return (String[])__ids.clone (); } public TimeService _this() { return TimeServiceHelper.narrow( super._this_object()); } public TimeService _this(org.omg.CORBA.ORB orb) { return TimeServiceHelper.narrow( super._this_object(orb)); } } // class TimeServicePOA