code: private HTTPExchange claimExchange(int idx) {
          assertLocked();
  
          HTTPExchange exch = null;
  
          // Claim the exchange
          for (HTTPExchange toClaim : exchanges) {
              if (findProcessorForExchange(toClaim) == null) {
                  exch = toClaim;
                  break;
              }
          }
  
          if (exch != null) {
              procThreads[idx].procExchange = exch;
              if (LOG.isLoggable(Level.FINEST)) {
                  LOG.finest(
                      "Thread " + idx + " claimed: "
                          + exch.getRequest().getAttribute(Attributes.RID));
              }
          } else {
              if (LOG.isLoggable(Level.FINEST))
                  LOG.finest("Thread " + idx + " will wait for new request...");
          }
  
          return exch;
      }
docs: Finds and claims the exchange that has not been taken by other request
  processor.
  
  @param idx the {@link #procThreads} index of the "RequestProcessor"
  for which this method is executed.
  
  @return <tt>HTTPExchange</tt> claimed for
  the <tt>{@link RequestProcessor}</tt> or <tt>null</tt> if there are no
  unclaimed exchanges available at this time.