'Process the responses from the client.'

@flow.StateHandler()
def ProcessEntry(self, responses):

    if (not responses.success):
        return
    if (responses.iterator and (responses.iterator.state != responses.iterator.State.FINISHED)):
        findspec = rdf_client.FindSpec(responses.request.request.payload)
        findspec.iterator = responses.iterator
        self.CallClient(server_stubs.Find, findspec, next_state='ProcessEntry', request_data=responses.request_data)
    stat_responses = [(r.hit if isinstance(r, rdf_client.FindSpec) else r) for r in responses]
    component_path = responses.request_data.get('component_path')
    if (component_path is not None):
        for response in stat_responses:
            self._ProcessResponse(response, [component_path])
    else:
        base_path = responses.request_data['base_path']
        base_node = self.FindNode(base_path)
        for response in stat_responses:
            matching_components = []
            for next_node in base_node.keys():
                pathspec = rdf_paths.PathSpec.FromSerializedString(next_node)
                if self._MatchPath(pathspec, response):
                    matching_path = (base_path + [next_node])
                    matching_components.append(matching_path)
            if matching_components:
                self._ProcessResponse(response, matching_components, base_wildcard=True)
