public DefaultHttpClient createClientWithPool(Integer socketTimeoutMillisecond) {
            ThreadSafeClientConnManager connectionManager = new ThreadSafeClientConnManager();
            connectionManager.setDefaultMaxPerRoute(300);
            connectionManager.setMaxTotal(2048);
            client = new MyHttpClient(connectionManager);
            client.getParams().setParameter(CoreProtocolPNames.USER_AGENT,
                    "allen-httpclient");

            client.getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT,
                    socketTimeoutMillisecond != null ? socketTimeoutMillisecond : 10 * 1000);
            client.getParams().setIntParameter(
                    CoreConnectionPNames.CONNECTION_TIMEOUT, 2 * 1000);
            return client;
        }