private static synchronized void kill() { if (sessionList != null) { for (HTTPSession session : sessionList) { session.close(); } sessionList.clear(); // Rebuild the connection manager connmgr.shutdown(); connmgr = new MultiThreadedHttpConnectionManager(); setGlobalThreadCount(DFALTTHREADCOUNT); } }
static { connmgr = new MultiThreadedHttpConnectionManager(); setGlobalThreadCount(DFALTTHREADCOUNT); registry = new ArrayList<ProtocolEntry>(); // Fill in the registry for our various https ports // allow self-signed certificates registerProtocol( "https", 0, new Protocol("https", new EasySSLProtocolSocketFactory(), 443)); // default registerProtocol( "https", 8443, new Protocol("https", new EasySSLProtocolSocketFactory(), 8443)); // std tomcat https entry setGlobalConnectionTimeout(DFALTTIMEOUT); setGlobalSoTimeout(DFALTTIMEOUT); getGlobalProxyD(); // get info from -D if possible setGlobalKeyStore(); }
// Alias public static void setGlobalMaxConnections(int nthreads) { setGlobalThreadCount(nthreads); }