sources:


website:
more info here
studies/corba/Corba-Code1/client/CosTime/_TimeServiceStub.java
download file

  1 package CosTime;
  2
  3
  4 /** * 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 */
  5
  6 public class _TimeServiceStub extends org.omg.CORBA.portable.ObjectImpl implements CosTime.TimeService {
  7
  8   public CosTime.UTO universal_time () throws CosTime.TimeUnavailable   {
  9             org.omg.CORBA.portable.InputStream ===>$<===in = null;
 10             try {
 11                 org.omg.CORBA.portable.OutputStream ===>$<===out = _request ("universal_time", true);
 12                 ===>$<===in = _invoke (===>$<===out);
 13                 CosTime.UTO ===>$<===result = CosTime.UTOHelper.read (===>$<===in);
 14                 return ===>$<===result;
 15             } catch (org.omg.CORBA.portable.ApplicationException ===>$<===ex) {
 16                 ===>$<===in = ===>$<===ex.getInputStream ();
 17                 String _id = ===>$<===ex.getId ();
 18                 if (_id.equals ("IDL:hpi.uni-potsdam.de/CosTime/TimeUnavailable:1.0"))
 19                     throw CosTime.TimeUnavailableHelper.read (===>$<===in);
 20                 else                     throw new org.omg.CORBA.MARSHAL (_id);
 21             } catch (org.omg.CORBA.portable.RemarshalException ===>$<===rm) {
 22                 return universal_time (        );
 23             } finally {
 24                 _releaseReply (===>$<===in);
 25             }
 26   } // universal_time
 27
 28   public CosTime.UTO secure_universal_time () throws CosTime.TimeUnavailable   {
 29             org.omg.CORBA.portable.InputStream ===>$<===in = null;
 30             try {
 31                 org.omg.CORBA.portable.OutputStream ===>$<===out = _request ("secure_universal_time", true);
 32                 ===>$<===in = _invoke (===>$<===out);
 33                 CosTime.UTO ===>$<===result = CosTime.UTOHelper.read (===>$<===in);
 34                 return ===>$<===result;
 35             } catch (org.omg.CORBA.portable.ApplicationException ===>$<===ex) {
 36                 ===>$<===in = ===>$<===ex.getInputStream ();
 37                 String _id = ===>$<===ex.getId ();
 38                 if (_id.equals ("IDL:hpi.uni-potsdam.de/CosTime/TimeUnavailable:1.0"))
 39                     throw CosTime.TimeUnavailableHelper.read (===>$<===in);
 40                 else                     throw new org.omg.CORBA.MARSHAL (_id);
 41             } catch (org.omg.CORBA.portable.RemarshalException ===>$<===rm) {
 42                 return secure_universal_time (        );
 43             } finally {
 44                 _releaseReply (===>$<===in);
 45             }
 46   } // secure_universal_time
 47
 48   public CosTime.UTO new_universal_time (long time, long inaccuracy)
 49   {
 50             org.omg.CORBA.portable.InputStream ===>$<===in = null;
 51             try {
 52                 org.omg.CORBA.portable.OutputStream ===>$<===out = _request ("new_universal_time", true);
 53                 TimeBase.TimeTHelper.write (===>$<===out, time);
 54                 TimeBase.InaccuracyTHelper.write (===>$<===out, inaccuracy);
 55                 ===>$<===in = _invoke (===>$<===out);
 56                 CosTime.UTO ===>$<===result = CosTime.UTOHelper.read (===>$<===in);
 57                 return ===>$<===result;
 58             } catch (org.omg.CORBA.portable.ApplicationException ===>$<===ex) {
 59                 ===>$<===in = ===>$<===ex.getInputStream ();
 60                 String _id = ===>$<===ex.getId ();
 61                 throw new org.omg.CORBA.MARSHAL (_id);
 62             } catch (org.omg.CORBA.portable.RemarshalException ===>$<===rm) {
 63                 return new_universal_time (time, inaccuracy        );
 64             } finally {
 65                 _releaseReply (===>$<===in);
 66             }
 67   } // new_universal_time
 68
 69   public CosTime.UTO uto_from_utc (TimeBase.UtcT utc)
 70   {
 71             org.omg.CORBA.portable.InputStream ===>$<===in = null;
 72             try {
 73                 org.omg.CORBA.portable.OutputStream ===>$<===out = _request ("uto_from_utc", true);
 74                 TimeBase.UtcTHelper.write (===>$<===out, utc);
 75                 ===>$<===in = _invoke (===>$<===out);
 76                 CosTime.UTO ===>$<===result = CosTime.UTOHelper.read (===>$<===in);
 77                 return ===>$<===result;
 78             } catch (org.omg.CORBA.portable.ApplicationException ===>$<===ex) {
 79                 ===>$<===in = ===>$<===ex.getInputStream ();
 80                 String _id = ===>$<===ex.getId ();
 81                 throw new org.omg.CORBA.MARSHAL (_id);
 82             } catch (org.omg.CORBA.portable.RemarshalException ===>$<===rm) {
 83                 return uto_from_utc (utc        );
 84             } finally {
 85                 _releaseReply (===>$<===in);
 86             }
 87   } // uto_from_utc
 88
 89   // Type-specific CORBA::Object operations
 90   private static String[] __ids = {
 91     "IDL:hpi.uni-potsdam.de/CosTime/TimeService:1.0"};
 92
 93   public String[] _ids ()
 94   {
 95     return (String[])__ids.clone ();
 96   }
 97
 98   private void readObject (java.io.ObjectInputStream s) throws java.io.IOException   {
 99      String str = s.readUTF ();
100      String[] args = null;
101      java.util.Properties props = null;
102      org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
103      org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
104      _set_delegate (delegate);
105   }
106
107   private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException   {
108      String[] args = null;
109      java.util.Properties props = null;
110      String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
111      s.writeUTF (str);
112   }
113 } // class _TimeServiceStub
114
115