/**
   * Processes an incoming RPC response.
   *
   * @param rpcResponse the RPC response to be processed
   */
  void processIncomingRPCResponse(final RPCResponse rpcResponse) {

    final Integer messageID = Integer.valueOf(rpcResponse.getMessageID());

    final RPCRequestMonitor requestMonitor = this.pendingRequests.get(messageID);

    // The caller has already timed out or received an earlier response
    if (requestMonitor == null) return;

    synchronized (requestMonitor) {
      requestMonitor.rpcResponse = rpcResponse;
      requestMonitor.notify();
    }
  }