@Override
    public void handleRequestDone(Request req) {
        List<VersionHandler> handlers;
        boolean shouldLog = log.isLoggable(Level.FINE);
        synchronized (this) {
            targetInvoked = false;
            if (req.checkReturnTypes("s")) {
                Utf8Array str = req.returnValues().get(0).asUtf8Array();
                try {
                    version = new Version(str);
                    if (shouldLog) {
                        log.log(Level.FINE, "Target '" + name + "' has version " + version + ".");
                    }
                } catch (IllegalArgumentException e) {
                    log.log(Level.WARNING, "Failed to parse '" + str + "' as version for target '" + name + "'.", e);
                }
            } else {
                log.log(Level.INFO, "Method mbus.getVersion() failed for target '" + name + "'; " +
                                       req.errorMessage());
            }
            handlers = versionHandlers;
            versionHandlers = new LinkedList<>();
        }
        for (VersionHandler handler : handlers) {
            handler.handleVersion(version);
        }
    }
<p>Requests the version of this target be passed to the given {@link
VersionHandler}. If the version is available, the handler is called
synchronously; if not, the handler is called by the network thread once
the target responds to the version query.</p>

@param timeout The timeout for the request in seconds.
@param handler The handler to be called once the version is available.
messagebus/src/main/java/com/yahoo/messagebus/network/rpc/RPCTarget.java