コード例 #1
0
 // implementation of sayHelloWorld()
 public java.lang.String sayHelloWorld() throws java.rmi.RemoteException {
   try {
     java.rmi.server.RemoteCall call =
         ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
     ref.invoke(call);
     java.lang.String $result;
     try {
       java.io.ObjectInput in = call.getInputStream();
       $result = (java.lang.String) in.readObject();
     } catch (java.io.IOException e) {
       throw new java.rmi.UnmarshalException("error unmarshalling return", e);
     } catch (java.lang.ClassNotFoundException e) {
       throw new java.rmi.UnmarshalException("error unmarshalling return", e);
     } finally {
       ref.done(call);
     }
     return $result;
   } catch (java.lang.RuntimeException e) {
     throw e;
   } catch (java.rmi.RemoteException e) {
     throw e;
   } catch (java.lang.Exception e) {
     throw new java.rmi.UnexpectedException("undeclared checked exception", e);
   }
 }
コード例 #2
0
  // implementation of doSomething()
  public void doSomething() throws java.rmi.RemoteException {
    String codebase = System.getProperty("java.rmi.server.codebase", "");

    try {
      if (useNewInvoke) {
        ref.invoke(
            this, $method_doSomething_1, new java.lang.Object[] {codebase}, 3082155412933025001L);
      } else {
        java.rmi.server.RemoteCall call =
            ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
        try {
          java.io.ObjectOutput out = call.getOutputStream();
          out.writeObject(codebase);
        } catch (java.io.IOException e) {
          throw new java.rmi.MarshalException("error marshalling arguments", e);
        }
        ref.invoke(call);
        ref.done(call);
      }
    } catch (java.lang.RuntimeException e) {
      throw e;
    } catch (java.rmi.RemoteException e) {
      throw e;
    } catch (java.lang.Exception e) {
      throw new java.rmi.UnexpectedException("undeclared checked exception", e);
    }
  }
コード例 #3
0
 // implementation of tellServerName(String)
 public void tellServerName(java.lang.String $param_String_1) throws java.rmi.RemoteException {
   try {
     if (useNewInvoke) {
       ref.invoke(
           this,
           $method_tellServerName_0,
           new java.lang.Object[] {$param_String_1},
           -5180633734615762942L);
     } else {
       java.rmi.server.RemoteCall call =
           ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
       try {
         java.io.ObjectOutput out = call.getOutputStream();
         out.writeObject($param_String_1);
       } catch (java.io.IOException e) {
         throw new java.rmi.MarshalException("error marshalling arguments", e);
       }
       ref.invoke(call);
       ref.done(call);
     }
   } catch (java.lang.RuntimeException e) {
     throw e;
   } catch (java.rmi.RemoteException e) {
     throw e;
   } catch (java.lang.Exception e) {
     throw new java.rmi.UnexpectedException("undeclared checked exception", e);
   }
 }
コード例 #4
0
  public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
      throws java.lang.Exception {
    if (hash != interfaceHash)
      throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");

    com.msrm.rmi.ShipperImpl server = (com.msrm.rmi.ShipperImpl) obj;
    switch (opnum) {
      case 0: // ship(Integer[], String[], Float[])
        {
          java.lang.Integer[] $param_arrayOf_Integer_1;
          java.lang.String[] $param_arrayOf_String_2;
          java.lang.Float[] $param_arrayOf_Float_3;
          try {
            java.io.ObjectInput in = call.getInputStream();
            $param_arrayOf_Integer_1 = (java.lang.Integer[]) in.readObject();
            $param_arrayOf_String_2 = (java.lang.String[]) in.readObject();
            $param_arrayOf_Float_3 = (java.lang.Float[]) in.readObject();
          } catch (java.io.IOException e) {
            throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
          } catch (java.lang.ClassNotFoundException e) {
            throw new java.rmi.UnmarshalException("error unmarshalling arguments", e);
          } finally {
            call.releaseInputStream();
          }
          java.util.Map $result =
              server.ship(
                  $param_arrayOf_Integer_1, $param_arrayOf_String_2, $param_arrayOf_Float_3);
          try {
            java.io.ObjectOutput out = call.getResultStream(true);
            out.writeObject($result);
          } catch (java.io.IOException e) {
            throw new java.rmi.MarshalException("error marshalling return", e);
          }
          break;
        }

      default:
        throw new java.rmi.UnmarshalException("invalid method number");
    }
  }
コード例 #5
0
  @Override
  public void dispatch(
      final java.rmi.Remote obj, final java.rmi.server.RemoteCall call, int opnum, final long hash)
      throws java.lang.Exception {
    if (opnum < 0) {
      if (hash == -2859605693618835423L) {
        opnum = 0;
      } else {
        throw new java.rmi.UnmarshalException("invalid method hash");
      }
    } else {
      if (hash != interfaceHash) {
        throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
      }
    }

    final suncertify.admin.LockableServiceProvider server =
        (suncertify.admin.LockableServiceProvider) obj;
    switch (opnum) {
      case 0: // getRoomOfferService()
        {
          call.releaseInputStream();
          final suncertify.common.RoomOfferService $result = server.getRoomOfferService();
          try {
            final java.io.ObjectOutput out = call.getResultStream(true);
            out.writeObject($result);
          } catch (final java.io.IOException e) {
            throw new java.rmi.MarshalException("error marshalling return", e);
          }
          break;
        }

      default:
        throw new java.rmi.UnmarshalException("invalid method number");
    }
  }
コード例 #6
0
  public void dispatch(java.rmi.Remote remote, java.rmi.server.RemoteCall remotecall, int i, long l)
      throws java.lang.Exception {
    if (i < 0) {
      if (l == 0x8f52993aa062f7fbL) {
        i = 0;
      } else if (l == 0x61a7d5ece71019b9L) {
        i = 1;
      } else if (l == 0x850816858666c3c4L) {
        i = 2;
      } else {
        throw new UnmarshalException("invalid method hash");
      }
    } else if (l != 0xf36e3583336c79d2L) {
      throw new SkeletonMismatchException("interface hash mismatch");
    }
    COM.dragonflow.Utils.WebSphere.WebSphereServerImpl websphereserverimpl =
        (COM.dragonflow.Utils.WebSphere.WebSphereServerImpl) remote;
    switch (i) {
      case 0: // '\0'
        remotecall.releaseInputStream();
        String s = websphereserverimpl.getBrowseData();
        try {
          java.io.ObjectOutput objectoutput = remotecall.getResultStream(true);
          objectoutput.writeObject(s);
        } catch (java.io.IOException ioexception) {
          throw new MarshalException("error marshalling return", ioexception);
        }
        break;

      case 1: // '\001'
        COM.dragonflow.Utils.WebSphere.WebSphereCounter awebspherecounter[];
        try {
          java.io.ObjectInput objectinput = remotecall.getInputStream();
          awebspherecounter =
              (COM.dragonflow.Utils.WebSphere.WebSphereCounter[]) objectinput.readObject();
        } catch (java.io.IOException ioexception3) {
          throw new UnmarshalException("error unmarshalling arguments", ioexception3);
        } catch (java.lang.ClassNotFoundException classnotfoundexception) {
          throw new UnmarshalException("error unmarshalling arguments", classnotfoundexception);
        } finally {
          remotecall.releaseInputStream();
        }
        COM.dragonflow.Utils.WebSphere.WebSphereCounter awebspherecounter1[] =
            websphereserverimpl.getCounters(awebspherecounter);
        try {
          java.io.ObjectOutput objectoutput2 = remotecall.getResultStream(true);
          objectoutput2.writeObject(awebspherecounter1);
        } catch (java.io.IOException ioexception2) {
          throw new MarshalException("error marshalling return", ioexception2);
        }
        break;

      case 2: // '\002'
        remotecall.releaseInputStream();
        String s1 = websphereserverimpl.getServerName();
        try {
          java.io.ObjectOutput objectoutput1 = remotecall.getResultStream(true);
          objectoutput1.writeObject(s1);
        } catch (java.io.IOException ioexception1) {
          throw new MarshalException("error marshalling return", ioexception1);
        }
        break;

      default:
        throw new UnmarshalException("invalid method number");
    }
  }