The Java Program: IdentityRemoteObject_Stub.java

  1 // Stub class generated by rmic, do not edit.
  2 // Contents subject to change without notice.
  3 
  4 public final class IdentityRemoteObject_Stub
  5     extends java.rmi.server.RemoteStub
  6     implements Identifiable, java.rmi.Remote
  7 {
  8     private static final java.rmi.server.Operation[] operations = {
  9         new java.rmi.server.Operation("java.util.Date getDate()"),
 10         new java.rmi.server.Operation("java.lang.String getHost()"),
 11         new java.rmi.server.Operation("java.lang.String getUser()")
 12     };
 13     
 14     private static final long interfaceHash = -3501306011356640914L;
 15     
 16     private static final long serialVersionUID = 2;
 17     
 18     private static boolean useNewInvoke;
 19     private static java.lang.reflect.Method $method_getDate_0;
 20     private static java.lang.reflect.Method $method_getHost_1;
 21     private static java.lang.reflect.Method $method_getUser_2;
 22     
 23     static {
 24         try {
 25             java.rmi.server.RemoteRef.class.getMethod("invoke",
 26                 new java.lang.Class[] {
 27                     java.rmi.Remote.class,
 28                     java.lang.reflect.Method.class,
 29                     java.lang.Object[].class,
 30                     long.class
 31                 });
 32             useNewInvoke = true;
 33             $method_getDate_0 = Identifiable.class.getMethod("getDate", new java.lang.Class[] {});
 34             $method_getHost_1 = Identifiable.class.getMethod("getHost", new java.lang.Class[] {});
 35             $method_getUser_2 = Identifiable.class.getMethod("getUser", new java.lang.Class[] {});
 36         } catch (java.lang.NoSuchMethodException e) {
 37             useNewInvoke = false;
 38         }
 39     }
 40     
 41     // constructors
 42     public IdentityRemoteObject_Stub() {
 43         super();
 44     }
 45     public IdentityRemoteObject_Stub(java.rmi.server.RemoteRef ref) {
 46         super(ref);
 47     }
 48     
 49     // methods from remote interfaces
 50     
 51     // implementation of getDate()
 52     public java.util.Date getDate()
 53         throws java.rmi.RemoteException
 54     {
 55         try {
 56             if (useNewInvoke) {
 57                 Object $result = ref.invoke(this, $method_getDate_0, null, -1017285815713287420L);
 58                 return ((java.util.Date) $result);
 59             } else {
 60                 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
 61                 ref.invoke(call);
 62                 java.util.Date $result;
 63                 try {
 64                     java.io.ObjectInput in = call.getInputStream();
 65                     $result = (java.util.Date) in.readObject();
 66                 } catch (java.io.IOException e) {
 67                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
 68                 } catch (java.lang.ClassNotFoundException e) {
 69                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
 70                 } finally {
 71                     ref.done(call);
 72                 }
 73                 return $result;
 74             }
 75         } catch (java.lang.RuntimeException e) {
 76             throw e;
 77         } catch (java.rmi.RemoteException e) {
 78             throw e;
 79         } catch (java.lang.Exception e) {
 80             throw new java.rmi.UnexpectedException("undeclared checked exception", e);
 81         }
 82     }
 83     
 84     // implementation of getHost()
 85     public java.lang.String getHost()
 86         throws java.rmi.RemoteException
 87     {
 88         try {
 89             if (useNewInvoke) {
 90                 Object $result = ref.invoke(this, $method_getHost_1, null, 6303500972804249791L);
 91                 return ((java.lang.String) $result);
 92             } else {
 93                 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
 94                 ref.invoke(call);
 95                 java.lang.String $result;
 96                 try {
 97                     java.io.ObjectInput in = call.getInputStream();
 98                     $result = (java.lang.String) in.readObject();
 99                 } catch (java.io.IOException e) {
100                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
101                 } catch (java.lang.ClassNotFoundException e) {
102                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
103                 } finally {
104                     ref.done(call);
105                 }
106                 return $result;
107             }
108         } catch (java.lang.RuntimeException e) {
109             throw e;
110         } catch (java.rmi.RemoteException e) {
111             throw e;
112         } catch (java.lang.Exception e) {
113             throw new java.rmi.UnexpectedException("undeclared checked exception", e);
114         }
115     }
116     
117     // implementation of getUser()
118     public java.lang.String getUser()
119         throws java.rmi.RemoteException
120     {
121         try {
122             if (useNewInvoke) {
123                 Object $result = ref.invoke(this, $method_getUser_2, null, -5511863242770432035L);
124                 return ((java.lang.String) $result);
125             } else {
126                 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
127                 ref.invoke(call);
128                 java.lang.String $result;
129                 try {
130                     java.io.ObjectInput in = call.getInputStream();
131                     $result = (java.lang.String) in.readObject();
132                 } catch (java.io.IOException e) {
133                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
134                 } catch (java.lang.ClassNotFoundException e) {
135                     throw new java.rmi.UnmarshalException("error unmarshalling return", e);
136                 } finally {
137                     ref.done(call);
138                 }
139                 return $result;
140             }
141         } catch (java.lang.RuntimeException e) {
142             throw e;
143         } catch (java.rmi.RemoteException e) {
144             throw e;
145         } catch (java.lang.Exception e) {
146             throw new java.rmi.UnexpectedException("undeclared checked exception", e);
147         }
148     }
149 }