setDefaultRetryPolicy
void session.setDefaultRetryPolicy ( RetryPolicy retryPolicy ) (professional and enterprise editions only)
Description
Sets a retry policy that will affect all files in the scrape. This policy will be used by all scrapeable files that do not have a retry policy set for them. If a retry policy was manually set for them, this one will not be used.
Parameters
- retryPolicy The retry policy to use by default, if no other retry policy is set.
Return Value
This method returns void.
Change Log
Version | Description |
---|---|
5.5.29a | Available in professional and enterprise editions. |
Examples
Create a defaul RetryPolicy
import com.screenscraper.util.retry.RetryPolicyFactory;
// Use a retry policy that will rotate the proxy if there was an error on request
session.setDefaultRetryPolicy(RetryPolicyFactory.getBasicPolicy(5, "Get new proxy"));
// Use a retry policy that will rotate the proxy if there was an error on request
session.setDefaultRetryPolicy(RetryPolicyFactory.getBasicPolicy(5, "Get new proxy"));
mikes on 11/21/2011 at 3:01 pm
- Printer-friendly version
- Login or register to post comments