class ParallelProtocolProducer implements ProtocolProducer {

  protected <ResourcePoolT extends ResourcePool> void iterate(
      Iterator<ProtocolProducer> iterator, ProtocolCollection<ResourcePoolT> protocolCollection) {
    while (iterator.hasNext() && protocolCollection.hasFreeCapacity()) {
      ProtocolProducer producer = iterator.next();
      if (producer.hasNextProtocols()) {
        producer.getNextProtocols(protocolCollection);
      } else {
        iterator.remove();
      }
    }
  }

  public  ParallelProtocolProducer(List<ProtocolProducer> protocols);

}