home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / rmi / transport / DGCImpl_Stub.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  2.7 KB  |  95 lines

  1. package sun.rmi.transport;
  2.  
  3. import java.io.IOException;
  4. import java.io.ObjectInput;
  5. import java.io.ObjectOutput;
  6. import java.rmi.MarshalException;
  7. import java.rmi.RemoteException;
  8. import java.rmi.UnexpectedException;
  9. import java.rmi.UnmarshalException;
  10. import java.rmi.dgc.DGC;
  11. import java.rmi.dgc.Lease;
  12. import java.rmi.dgc.VMID;
  13. import java.rmi.server.ObjID;
  14. import java.rmi.server.Operation;
  15. import java.rmi.server.RemoteCall;
  16. import java.rmi.server.RemoteRef;
  17. import java.rmi.server.RemoteStub;
  18.  
  19. public final class DGCImpl_Stub extends RemoteStub implements DGC {
  20.    private static Operation[] operations = new Operation[]{new Operation("void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)"), new Operation("java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)")};
  21.    private static final long interfaceHash = -669196253586618813L;
  22.  
  23.    public DGCImpl_Stub() {
  24.    }
  25.  
  26.    public DGCImpl_Stub(RemoteRef var1) {
  27.       super(var1);
  28.    }
  29.  
  30.    public void clean(ObjID[] var1, long var2, VMID var4, boolean var5) throws RemoteException {
  31.       byte var6 = 0;
  32.       RemoteRef var7 = super.ref;
  33.       RemoteCall var8 = var7.newCall(this, operations, var6, -669196253586618813L);
  34.  
  35.       try {
  36.          ObjectOutput var9 = var8.getOutputStream();
  37.          var9.writeObject(var1);
  38.          var9.writeLong(var2);
  39.          var9.writeObject(var4);
  40.          var9.writeBoolean(var5);
  41.       } catch (IOException var12) {
  42.          throw new MarshalException("Error marshaling arguments", var12);
  43.       }
  44.  
  45.       try {
  46.          var7.invoke(var8);
  47.       } catch (RemoteException var10) {
  48.          throw var10;
  49.       } catch (Exception var11) {
  50.          throw new UnexpectedException("Unexpected exception", var11);
  51.       }
  52.  
  53.       var7.done(var8);
  54.    }
  55.  
  56.    public Lease dirty(ObjID[] var1, long var2, Lease var4) throws RemoteException {
  57.       byte var5 = 1;
  58.       RemoteRef var6 = super.ref;
  59.       RemoteCall var7 = var6.newCall(this, operations, var5, -669196253586618813L);
  60.  
  61.       try {
  62.          ObjectOutput var8 = var7.getOutputStream();
  63.          var8.writeObject(var1);
  64.          var8.writeLong(var2);
  65.          var8.writeObject(var4);
  66.       } catch (IOException var25) {
  67.          throw new MarshalException("Error marshaling arguments", var25);
  68.       }
  69.  
  70.       try {
  71.          var6.invoke(var7);
  72.       } catch (RemoteException var23) {
  73.          throw var23;
  74.       } catch (Exception var24) {
  75.          throw new UnexpectedException("Unexpected exception", var24);
  76.       }
  77.  
  78.       Lease var26;
  79.       try {
  80.          ObjectInput var11 = var7.getInputStream();
  81.          var26 = (Lease)var11.readObject();
  82.       } catch (IOException var19) {
  83.          throw new UnmarshalException("Error unmarshaling return", var19);
  84.       } catch (ClassNotFoundException var20) {
  85.          throw new UnmarshalException("Return value class not found", var20);
  86.       } catch (Exception var21) {
  87.          throw new UnexpectedException("Unexpected exception", var21);
  88.       } finally {
  89.          var6.done(var7);
  90.       }
  91.  
  92.       return var26;
  93.    }
  94. }
  95.