void proxyServerPool.filter ( int timeout )


Set the timeout that will render a proxy as being bad.


  • timeout Number of seconds before timeout, as an integer.

Return Values

Returns void.

Change Log

Version Description
4.5 Available for all editions.


Setup Timout for Bad Proxies

 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" );

 // Validate proxies up to 25 proxies at a time.
 proxyServerPool.setNumProxiesToValidateConcurrently( 25 );

 // This method call tells screen-scraper to filter the list of>
 // proxy servers using 7 seconds as a timeout value. That is,
 // if a server doesnt respond within 7 seconds, it's deemed
 // to be invalid.

 proxyServerPool.filter( 7 );