The connection manager can no longer be used once shutdown.
Calling this method more than once will have no effect.
7980818283848586878889
* Shut down the client. Close any open persistent connections. */ public void shutdown() { MultiThreadedHttpConnectionManager manager = (MultiThreadedHttpConnectionManager) httpClient.getHttpConnectionManager(); manager.shutdown(); } /** * Execute a transaction method given only the path. Will select at random * one of the members of the supplied cluster definition and iterate through
8889909192939495969798
* Shut down the client. Close any open persistent connections. */ public void shutdown() { MultiThreadedHttpConnectionManager manager = (MultiThreadedHttpConnectionManager) httpClient.getHttpConnectionManager(); manager.shutdown(); } /** * @return the wrapped HttpClient */
252253254255256257258259260261262
} finally { latch.countDown(); System.err.println("Remaining: " + latch.getCount()); } } mgr.shutdown(); } } }; } for (int i = 0; i < threads.length; i++) {
104105106107108109110111112113114
255256257258259260261262263264265
= new MultiThreadedHttpConnectionManager(); httpClient = new HttpClient(connManager); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { public void run() { connManager.shutdown(); } })); List authPrefs = new ArrayList(2); authPrefs.add(AuthPolicy.DIGEST);
8990919293949596979899
265266267268269270271272273274275
new MultiThreadedHttpConnectionManager(); httpClient = new HttpClient(connManager); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { public void run() { connManager.shutdown(); } })); List authPrefs = new ArrayList(3); authPrefs.add(AuthPolicy.DIGEST);