@@ -0,0 +1,1436 @@
+package de.jeha.kame.crawler.core;%0A%0Aimport org.apache.http.config.RegistryBuilder;%0Aimport org.apache.http.conn.HttpClientConnectionManager;%0Aimport org.apache.http.conn.socket.ConnectionSocketFactory;%0Aimport org.apache.http.conn.socket.PlainConnectionSocketFactory;%0Aimport org.apache.http.conn.ssl.SSLConnectionSocketFactory;%0Aimport org.apache.http.impl.client.CloseableHttpClient;%0Aimport org.apache.http.impl.client.HttpClients;%0Aimport org.apache.http.impl.conn.BasicHttpClientConnectionManager;%0Aimport org.apache.http.impl.conn.SystemDefaultDnsResolver;%0A%0A/**%0A * @author jenshadlich@googlemail.com%0A */%0Apublic class HttpClientFactory %7B%0A%0A    private static CloseableHttpClient INSTANCE;%0A%0A    public synchronized static CloseableHttpClient getInstance() %7B%0A        if (INSTANCE == null) %7B%0A            HttpClientConnectionManager connectionManager = new BasicHttpClientConnectionManager(%0A                    RegistryBuilder.%3CConnectionSocketFactory%3Ecreate()%0A                            .register(%22http%22, PlainConnectionSocketFactory.getSocketFactory())%0A                            .register(%22https%22, SSLConnectionSocketFactory.getSocketFactory())%0A                            .build(),%0A                    null,%0A                    null,%0A                    new SystemDefaultDnsResolver()%0A            );%0A            INSTANCE = HttpClients.custom().setConnectionManager(connectionManager).build();%0A        %7D%0A%0A        return INSTANCE;%0A    %7D%0A%0A%7D%0A

add custom factory for http client connections