private void receiveFileMeta(Request req) {
        log.log(Level.FINEST, () -> "Received method call '" + req.methodName() + "' with parameters : " + req.parameters());
        FileReference reference = new FileReference(req.parameters().get(0).asString());
        String fileName = req.parameters().get(1).asString();
        Type type = FileReferenceData.Type.valueOf(req.parameters().get(2).asString());
        long fileSize = req.parameters().get(3).asInt64();
        CompressionType compressionType = (req.parameters().size() > 4)
                ? CompressionType.valueOf(req.parameters().get(4).asString())
                : CompressionType.gzip; // fallback/legacy compression type
        int sessionId = nextSessionId.getAndIncrement();
        int retval = 0;
        synchronized (sessions) {
            if (sessions.containsKey(sessionId)) {
                retval = 1;
                log.severe("Session id " + sessionId + " already exist, impossible. Request from " + req.target());
            } else {
                try {
                    sessions.put(sessionId, new Session(downloadDirectory, sessionId, reference,
                                                        type, compressionType, fileName, fileSize));
                } catch (Exception e) {
                    retval = 1;
                }
            }
        }
        req.returnValues().add(new Int32Value(retval));
        req.returnValues().add(new Int32Value(sessionId));
    }
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