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 / registry / RegistryImpl_Stub.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  3.7 KB  |  175 lines

  1. package sun.rmi.registry;
  2.  
  3. import java.io.IOException;
  4. import java.io.ObjectInput;
  5. import java.io.ObjectOutput;
  6. import java.rmi.AccessException;
  7. import java.rmi.AlreadyBoundException;
  8. import java.rmi.MarshalException;
  9. import java.rmi.NotBoundException;
  10. import java.rmi.Remote;
  11. import java.rmi.RemoteException;
  12. import java.rmi.UnexpectedException;
  13. import java.rmi.UnmarshalException;
  14. import java.rmi.registry.Registry;
  15. import java.rmi.server.Operation;
  16. import java.rmi.server.RemoteCall;
  17. import java.rmi.server.RemoteRef;
  18. import java.rmi.server.RemoteStub;
  19.  
  20. public final class RegistryImpl_Stub extends RemoteStub implements Registry, Remote {
  21.    private static Operation[] operations = new Operation[]{new Operation("void bind(java.lang.String, java.rmi.Remote)"), new Operation("java.lang.String list()[]"), new Operation("java.rmi.Remote lookup(java.lang.String)"), new Operation("void rebind(java.lang.String, java.rmi.Remote)"), new Operation("void unbind(java.lang.String)")};
  22.    private static final long interfaceHash = 4905912898345647071L;
  23.  
  24.    public RegistryImpl_Stub() {
  25.    }
  26.  
  27.    public RegistryImpl_Stub(RemoteRef var1) {
  28.       super(var1);
  29.    }
  30.  
  31.    public void bind(String var1, Remote var2) throws AccessException, AlreadyBoundException, RemoteException {
  32.       byte var3 = 0;
  33.       RemoteRef var4 = super.ref;
  34.       RemoteCall var5 = var4.newCall(this, operations, var3, 4905912898345647071L);
  35.  
  36.       try {
  37.          ObjectOutput var6 = var5.getOutputStream();
  38.          var6.writeObject(var1);
  39.          var6.writeObject(var2);
  40.       } catch (IOException var10) {
  41.          throw new MarshalException("Error marshaling arguments", var10);
  42.       }
  43.  
  44.       try {
  45.          var4.invoke(var5);
  46.       } catch (AlreadyBoundException var7) {
  47.          throw var7;
  48.       } catch (RemoteException var8) {
  49.          throw var8;
  50.       } catch (Exception var9) {
  51.          throw new UnexpectedException("Unexpected exception", var9);
  52.       }
  53.  
  54.       var4.done(var5);
  55.    }
  56.  
  57.    public String[] list() throws AccessException, RemoteException {
  58.       byte var1 = 1;
  59.       RemoteRef var2 = super.ref;
  60.       RemoteCall var3 = var2.newCall(this, operations, var1, 4905912898345647071L);
  61.  
  62.       try {
  63.          var2.invoke(var3);
  64.       } catch (RemoteException var18) {
  65.          throw var18;
  66.       } catch (Exception var19) {
  67.          throw new UnexpectedException("Unexpected exception", var19);
  68.       }
  69.  
  70.       String[] var4;
  71.       try {
  72.          ObjectInput var7 = var3.getInputStream();
  73.          var4 = (String[])var7.readObject();
  74.       } catch (IOException var14) {
  75.          throw new UnmarshalException("Error unmarshaling return", var14);
  76.       } catch (ClassNotFoundException var15) {
  77.          throw new UnmarshalException("Return value class not found", var15);
  78.       } catch (Exception var16) {
  79.          throw new UnexpectedException("Unexpected exception", var16);
  80.       } finally {
  81.          var2.done(var3);
  82.       }
  83.  
  84.       return var4;
  85.    }
  86.  
  87.    public Remote lookup(String var1) throws AccessException, NotBoundException, RemoteException {
  88.       byte var2 = 2;
  89.       RemoteRef var3 = super.ref;
  90.       RemoteCall var4 = var3.newCall(this, operations, var2, 4905912898345647071L);
  91.  
  92.       try {
  93.          ObjectOutput var5 = var4.getOutputStream();
  94.          var5.writeObject(var1);
  95.       } catch (IOException var24) {
  96.          throw new MarshalException("Error marshaling arguments", var24);
  97.       }
  98.  
  99.       try {
  100.          var3.invoke(var4);
  101.       } catch (NotBoundException var21) {
  102.          throw var21;
  103.       } catch (RemoteException var22) {
  104.          throw var22;
  105.       } catch (Exception var23) {
  106.          throw new UnexpectedException("Unexpected exception", var23);
  107.       }
  108.  
  109.       Remote var25;
  110.       try {
  111.          ObjectInput var8 = var4.getInputStream();
  112.          var25 = (Remote)var8.readObject();
  113.       } catch (IOException var17) {
  114.          throw new UnmarshalException("Error unmarshaling return", var17);
  115.       } catch (ClassNotFoundException var18) {
  116.          throw new UnmarshalException("Return value class not found", var18);
  117.       } catch (Exception var19) {
  118.          throw new UnexpectedException("Unexpected exception", var19);
  119.       } finally {
  120.          var3.done(var4);
  121.       }
  122.  
  123.       return var25;
  124.    }
  125.  
  126.    public void rebind(String var1, Remote var2) throws AccessException, RemoteException {
  127.       byte var3 = 3;
  128.       RemoteRef var4 = super.ref;
  129.       RemoteCall var5 = var4.newCall(this, operations, var3, 4905912898345647071L);
  130.  
  131.       try {
  132.          ObjectOutput var6 = var5.getOutputStream();
  133.          var6.writeObject(var1);
  134.          var6.writeObject(var2);
  135.       } catch (IOException var9) {
  136.          throw new MarshalException("Error marshaling arguments", var9);
  137.       }
  138.  
  139.       try {
  140.          var4.invoke(var5);
  141.       } catch (RemoteException var7) {
  142.          throw var7;
  143.       } catch (Exception var8) {
  144.          throw new UnexpectedException("Unexpected exception", var8);
  145.       }
  146.  
  147.       var4.done(var5);
  148.    }
  149.  
  150.    public void unbind(String var1) throws AccessException, NotBoundException, RemoteException {
  151.       byte var2 = 4;
  152.       RemoteRef var3 = super.ref;
  153.       RemoteCall var4 = var3.newCall(this, operations, var2, 4905912898345647071L);
  154.  
  155.       try {
  156.          ObjectOutput var5 = var4.getOutputStream();
  157.          var5.writeObject(var1);
  158.       } catch (IOException var9) {
  159.          throw new MarshalException("Error marshaling arguments", var9);
  160.       }
  161.  
  162.       try {
  163.          var3.invoke(var4);
  164.       } catch (NotBoundException var6) {
  165.          throw var6;
  166.       } catch (RemoteException var7) {
  167.          throw var7;
  168.       } catch (Exception var8) {
  169.          throw new UnexpectedException("Unexpected exception", var8);
  170.       }
  171.  
  172.       var3.done(var4);
  173.    }
  174. }
  175.