@Override public PDPResponseCollection request(final PDPRequestCollection reqCol) throws DecisionProcessingException { PDPRequestCollection openRequests = reqCol; Map<PDPRequest, PDPResponse> allResponses = new LinkedHashMap<PDPRequest, PDPResponse>(); PDPResponseCollection lastResponse = null; for (Iterator<DecisionService> serviceIt = m_decisionServices.iterator(); serviceIt.hasNext() && !openRequests.isEmpty(); openRequests = findOpenRequests(lastResponse, allResponses)) { DecisionService decisionService = serviceIt.next(); lastResponse = decisionService.request(openRequests); } // little optimization if (m_decisionServices.size() == 1 && lastResponse != null) { return lastResponse; } PDPResponseCollection response = new PDPResponseCollection(); for (Iterator<PDPRequest> requests = reqCol.iterator(); requests.hasNext();) { PDPResponse resp = allResponses.get(requests.next()); response.add(resp); } return response; }