use of sun.rmi.transport.Connection in project jdk8u_jdk by JetBrains.
the class UnicastRef method newCall.
/**
* Create an appropriate call object for a new call on this object.
* Passing operation array and index, allows the stubs generator to
* assign the operation indexes and interpret them. The RemoteRef
* may need the operation to encode in for the call.
*/
public RemoteCall newCall(RemoteObject obj, Operation[] ops, int opnum, long hash) throws RemoteException {
clientRefLog.log(Log.BRIEF, "get connection");
Connection conn = ref.getChannel().newConnection();
try {
clientRefLog.log(Log.VERBOSE, "create call context");
/* log information about the outgoing call */
if (clientCallLog.isLoggable(Log.VERBOSE)) {
logClientCall(obj, ops[opnum]);
}
RemoteCall call = new StreamRemoteCall(conn, ref.getObjID(), opnum, hash);
try {
marshalCustomCallData(call.getOutputStream());
} catch (IOException e) {
throw new MarshalException("error marshaling " + "custom call data");
}
return call;
} catch (RemoteException e) {
ref.getChannel().free(conn, false);
throw e;
}
}
Aggregations