class ServiceFactory {

    public HttpClient createHttpClient(boolean useProxy, String proxyHost, int proxyPort) {
        ProxySettings proxySettings = ProxySettings.fromConfig(useProxy, proxyHost, proxyPort);
        return httpClients.computeIfAbsent(proxySettings, this::createHttpClient);
    }

    public  ServiceFactory();
      ServiceFactory(HttpClientFactory httpClientFactory);

}