private void receiveFilePart(Request req) {
        log.log(Level.FINEST, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());

        FileReference reference = new FileReference(req.parameters().get(0).asString());
        int sessionId = req.parameters().get(1).asInt32();
        int partId = req.parameters().get(2).asInt32();
        byte [] part = req.parameters().get(3).asData();
        Session session = getSession(sessionId);
        int retval = verifySession(session, sessionId, reference);
        if (retval == 0) {
            try {
                session.addPart(partId, part);
            } catch (Exception e) {
                log.severe("Got exception " + e);
                retval = 1;
            }
            double completeness = (double) session.currentFileSize / (double) session.fileSize;
            log.log(Level.FINEST, () -> String.format("%.1f percent of '%s' downloaded", completeness * 100, reference.value()));
            downloads.setDownloadStatus(reference, completeness);
        }
        req.returnValues().add(new Int32Value(retval));
    }
When asking for a file reference, this handles RPC callbacks from config server with file data and metadata.
Uses the same Supervisor as the original caller that requests files, so communication uses the same
connection in both directions.

@author baldersheim
filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReceiver.java