The Java Program: IdentityRemoteObject_Skel.java

  1 // Skeleton class generated by rmic, do not edit.
  2 // Contents subject to change without notice.
  3 
  4 public final class IdentityRemoteObject_Skel
  5     implements java.rmi.server.Skeleton
  6 {
  7     private static final java.rmi.server.Operation[] operations = {
  8         new java.rmi.server.Operation("java.util.Date getDate()"),
  9         new java.rmi.server.Operation("java.lang.String getHost()"),
 10         new java.rmi.server.Operation("java.lang.String getUser()")
 11     };
 12     
 13     private static final long interfaceHash = -3501306011356640914L;
 14     
 15     public java.rmi.server.Operation[] getOperations() {
 16         return (java.rmi.server.Operation[]) operations.clone();
 17     }
 18     
 19     public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
 20         throws java.lang.Exception
 21     {
 22         if (opnum < 0) {
 23             if (hash == -1017285815713287420L) {
 24                 opnum = 0;
 25             } else if (hash == 6303500972804249791L) {
 26                 opnum = 1;
 27             } else if (hash == -5511863242770432035L) {
 28                 opnum = 2;
 29             } else {
 30                 throw new java.rmi.UnmarshalException("invalid method hash");
 31             }
 32         } else {
 33             if (hash != interfaceHash)
 34                 throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
 35         }
 36         
 37         IdentityRemoteObject server = (IdentityRemoteObject) obj;
 38         switch (opnum) {
 39         case 0: // getDate()
 40         {
 41             call.releaseInputStream();
 42             java.util.Date $result = server.getDate();
 43             try {
 44                 java.io.ObjectOutput out = call.getResultStream(true);
 45                 out.writeObject($result);
 46             } catch (java.io.IOException e) {
 47                 throw new java.rmi.MarshalException("error marshalling return", e);
 48             }
 49             break;
 50         }
 51             
 52         case 1: // getHost()
 53         {
 54             call.releaseInputStream();
 55             java.lang.String $result = server.getHost();
 56             try {
 57                 java.io.ObjectOutput out = call.getResultStream(true);
 58                 out.writeObject($result);
 59             } catch (java.io.IOException e) {
 60                 throw new java.rmi.MarshalException("error marshalling return", e);
 61             }
 62             break;
 63         }
 64             
 65         case 2: // getUser()
 66         {
 67             call.releaseInputStream();
 68             java.lang.String $result = server.getUser();
 69             try {
 70                 java.io.ObjectOutput out = call.getResultStream(true);
 71                 out.writeObject($result);
 72             } catch (java.io.IOException e) {
 73                 throw new java.rmi.MarshalException("error marshalling return", e);
 74             }
 75             break;
 76         }
 77             
 78         default:
 79             throw new java.rmi.UnmarshalException("invalid method number");
 80         }
 81     }
 82 }