< prev index next >

src/java.rmi/share/classes/sun/rmi/server/UnicastServerRef.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 38,48 **** import java.rmi.RemoteException; import java.rmi.ServerError; import java.rmi.ServerException; import java.rmi.UnmarshalException; import java.rmi.server.ExportException; - import java.rmi.server.Operation; import java.rmi.server.RemoteCall; import java.rmi.server.RemoteRef; import java.rmi.server.RemoteStub; import java.rmi.server.ServerNotActiveException; import java.rmi.server.ServerRef; --- 38,47 ----
*** 291,308 **** num = in.readInt(); } catch (Exception readEx) { throw new UnmarshalException("error unmarshalling call header", readEx); } ! if (skel != null) { ! // If there is a skeleton, use it oldDispatch(obj, call, num); return; ! ! } else if (num >= 0){ ! throw new UnmarshalException( ! "skeleton class not found but required for client version"); } try { op = in.readLong(); } catch (Exception readEx) { throw new UnmarshalException("error unmarshalling call header", --- 290,308 ---- num = in.readInt(); } catch (Exception readEx) { throw new UnmarshalException("error unmarshalling call header", readEx); } ! if (num >= 0) { ! if (skel != null) { oldDispatch(obj, call, num); return; ! } else { ! throw new UnmarshalException( ! "skeleton class not found but required " + ! "for client version"); ! } } try { op = in.readLong(); } catch (Exception readEx) { throw new UnmarshalException("error unmarshalling call header",
*** 426,437 **** } } /** * Handle server-side dispatch using the RMI 1.1 stub/skeleton ! * protocol, given a non-negative operation number or negative method hash ! * that has already been read from the call stream. * Exceptions are handled by the caller to be sent to the remote client. * * @param obj the target remote object for the call * @param call the "remote call" from which operation and * method arguments can be obtained. --- 426,437 ---- } } /** * Handle server-side dispatch using the RMI 1.1 stub/skeleton ! * protocol, given a non-negative operation number that has ! * already been read from the call stream. * Exceptions are handled by the caller to be sent to the remote client. * * @param obj the target remote object for the call * @param call the "remote call" from which operation and * method arguments can be obtained.
*** 459,470 **** } catch (Exception ioe) { throw new UnmarshalException("error unmarshalling call header", ioe); } // if calls are being logged, write out object id and operation ! Operation[] operations = skel.getOperations(); ! logCall(obj, op >= 0 && op < operations.length ? operations[op] : "op: " + op); unmarshalCustomCallData(in); // dispatch to skeleton for remote object skel.dispatch(obj, call, op, hash); } --- 459,469 ---- } catch (Exception ioe) { throw new UnmarshalException("error unmarshalling call header", ioe); } // if calls are being logged, write out object id and operation ! logCall(obj, skel.getOperations()[op]); unmarshalCustomCallData(in); // dispatch to skeleton for remote object skel.dispatch(obj, call, op, hash); }
< prev index next >