package CosTime; /** * CosTime/_TimeServiceStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.1" * from time.idl * Freitag, 18. April 2003 11.06 Uhr CEST */ public class _TimeServiceStub extends org.omg.CORBA.portable.ObjectImpl implements CosTime.TimeService { public CosTime.UTO universal_time () throws CosTime.TimeUnavailable { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("universal_time", true); $in = _invoke ($out); CosTime.UTO $result = CosTime.UTOHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:hpi.uni-potsdam.de/CosTime/TimeUnavailable:1.0")) throw CosTime.TimeUnavailableHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return universal_time ( ); } finally { _releaseReply ($in); } } // universal_time public CosTime.UTO secure_universal_time () throws CosTime.TimeUnavailable { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("secure_universal_time", true); $in = _invoke ($out); CosTime.UTO $result = CosTime.UTOHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); if (_id.equals ("IDL:hpi.uni-potsdam.de/CosTime/TimeUnavailable:1.0")) throw CosTime.TimeUnavailableHelper.read ($in); else throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return secure_universal_time ( ); } finally { _releaseReply ($in); } } // secure_universal_time public CosTime.UTO new_universal_time (long time, long inaccuracy) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("new_universal_time", true); TimeBase.TimeTHelper.write ($out, time); TimeBase.InaccuracyTHelper.write ($out, inaccuracy); $in = _invoke ($out); CosTime.UTO $result = CosTime.UTOHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return new_universal_time (time, inaccuracy ); } finally { _releaseReply ($in); } } // new_universal_time public CosTime.UTO uto_from_utc (TimeBase.UtcT utc) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("uto_from_utc", true); TimeBase.UtcTHelper.write ($out, utc); $in = _invoke ($out); CosTime.UTO $result = CosTime.UTOHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return uto_from_utc (utc ); } finally { _releaseReply ($in); } } // uto_from_utc // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:hpi.uni-potsdam.de/CosTime/TimeService:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); s.writeUTF (str); } } // class _TimeServiceStub