use of javax.rmi.PortableRemoteObject in project wildfly by wildfly.
the class StubStrategy method writeParams.
/**
* Marshals the sequence of method parameters into an output stream.
*
* @param out a CDR output stream
* @param params an object array with the parameters.
*/
public void writeParams(OutputStream out, Object[] params) {
int len = params.length;
if (len != paramWriters.length) {
throw IIOPLogger.ROOT_LOGGER.errorMashalingParams();
}
for (int i = 0; i < len; i++) {
Object param = params[i];
if (param instanceof PortableRemoteObject) {
try {
param = PortableRemoteObject.toStub((Remote) param);
} catch (NoSuchObjectException e) {
throw new RuntimeException(e);
}
}
paramWriters[i].write(out, RemoteObjectSubstitutionManager.writeReplaceRemote(param));
}
}
Aggregations