code: public static List<Protocol> createProtocols(List<ProtocolConfiguration> protocol_configs, final ProtocolStack stack) throws Exception {
          List<Protocol> retval=new LinkedList<>();
          for(int i=0; i < protocol_configs.size(); i++) {
              ProtocolConfiguration protocol_config=protocol_configs.get(i);
              Protocol layer=createLayer(stack, protocol_config);
              if(layer == null)
                  return null;
              retval.add(layer);
          }
          return retval;
      }
docs: Takes vector of ProtocolConfigurations, iterates through it, creates Protocol for
  each ProtocolConfiguration and returns all Protocols in a list.
  @param protocol_configs List of ProtocolConfigurations
  @param stack The protocol stack
  @return List of Protocols