void proxyServerPool.setNumProxiesToValidateConcurrently ( int numProxies )


Set the number of proxies that can be tested concurrently.


  • numProxies Number of proxies to be validated concurrently, as an integer.

Return Values

Returns void.

Change Log

Version Description
4.5 Available for all editions.


Test Proxies in Pool in Multiple Threads

 import com.screenscraper.util.*;

 // Create a new ProxyServerPool object.
 proxyServerPool = new ProxyServerPool();

 // Must be set on the session before other calls are made

 // This tells the pool to populate itself from a file
 proxyServerPool.populateFromFile( "proxies.txt" );

 // screen-scraper can iterate through all of the proxies to
 // ensure theyre responsive. This can be a time-consuming
 // process unless it's done in a multi-threaded fashion.
 // This method call tells screen-scraper to validate up to
 // 25 proxies at a time.

 proxyServerPool.setNumProxiesToValidateConcurrently( 25 );