@Override
    public void handleReply(Reply r) {
        globalPending.dec();
        ResultCallback owner = (ResultCallback) r.getContext();

        if (owner != null) {
            synchronized (metrics) {
                metrics.addReply(r);
            }
            log.log(Level.FINEST, () -> "Received reply for file " + owner.toString() + " count was " + owner.getPending().val());
            if (owner.isAborted()) {
                log.log(Level.FINE, () -> "Received reply for file " + owner.toString() + " which is aborted");
                owner.getPending().clear();
                return;
            }
            if (owner.handleReply(r)) {
                owner.getPending().dec();
            } else {
                log.log(Level.FINE, () -> "Received reply for file " + owner.toString() + " which wants to abort");
                owner.getPending().clear();
            }
        } else {
            log.log(Level.WARNING, "Received reply " + r + " for message " + r.getMessage() + " without context");
        }
    }
Implement replyHandler from messagebus. Called when a reply is received from messagebus.
Tries to find the callback from the reply context and updates the pending state for the callback.

@param r the reply to process.
vespaclient-core/src/main/java/com/yahoo/feedapi/SharedSender.java