public void returnOkResponse(JRTServerConfigRequest request, RawConfig config) {
        request.getRequestTrace().trace(TRACELEVEL, "Config proxy returnOkResponse()");
        request.addOkResponse(config.getPayload(),
                              config.getGeneration(),
                              config.applyOnRestart(),
                              config.getPayloadChecksums());
        log.log(Level.FINE, () -> "Return response: " + request.getShortDescription() + ",config checksums=" + config.getPayloadChecksums() +
                ",generation=" + config.getGeneration() + ",applyOnRestart=" + config.applyOnRestart());
        log.log(Level.FINEST, () -> "Config payload in response for " + request.getShortDescription() + ":" + config.getPayload());


        // TODO Catch exception for now, since the request might have been returned in CheckDelayedResponse
        // TODO Move logic so that all requests are returned in CheckDelayedResponse
        try {
            request.getRequest().returnRequest();
        } catch (IllegalStateException e) {
            log.log(Level.FINE, () -> "Something bad happened when sending response for '" + request.getShortDescription() + "':" + e.getMessage());
        }
        sentResponses.ifPresent(AtomicLong::getAndIncrement);
    }
An RPC server that handles config and file distribution requests.

@author hmusum
config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ResponseHandler.java