public LongPollingEventsManager( CachedBoxClient boxClient, Map<String, Object> httpParams, ExecutorService executorService) { this.cachedBoxClient = boxClient; this.executorService = executorService; this.httpParams = new BasicHttpParams(); HttpConnectionParams.setSoKeepalive(this.httpParams, true); if (httpParams != null) { for (Map.Entry<String, Object> entry : httpParams.entrySet()) { this.httpParams.setParameter(entry.getKey(), entry.getValue()); } } }