| java.lang.Object com.gargoylesoftware.htmlunit.WaitingRefreshHandler
WaitingRefreshHandler | public class WaitingRefreshHandler implements RefreshHandler(Code) | | This refresh handler waits the specified number of seconds (or a user defined maximum)
before refreshing the specified page, using the specified URL. Waiting happens
on the current thread
If you want a refresh handler that ignores the wait time, see
ImmediateRefreshHandler .
version: $Revision: 2132 $ author: Mike Bowler author: Daniel Gredler |
Constructor Summary | |
public | WaitingRefreshHandler(int maxwait) Create a WaitingRefreshHandler that will wait whatever time the server or
content asks unless it it longer than maxwait.
Parameters: maxwait - The maximum wait time before the refresh (in seconds). | public | WaitingRefreshHandler() Create a WaitingRefreshHandler that will always wait whatever time the server or
content asks. |
Method Summary | |
public void | handleRefresh(Page page, URL url, int requestedWait) Refreshes the specified page using the specified URL after the specified number
of seconds.
Parameters: page - The page that is going to be refreshed. Parameters: url - The URL where the new page will be loaded. Parameters: requestedWait - The number of seconds to wait before reloading the page. |
WaitingRefreshHandler | public WaitingRefreshHandler(int maxwait)(Code) | | Create a WaitingRefreshHandler that will wait whatever time the server or
content asks unless it it longer than maxwait.
Parameters: maxwait - The maximum wait time before the refresh (in seconds). A valueless than one (1) will cause WaitingRefreshHandler to wait for whatever time the server or content asks. |
WaitingRefreshHandler | public WaitingRefreshHandler()(Code) | | Create a WaitingRefreshHandler that will always wait whatever time the server or
content asks.
|
handleRefresh | public void handleRefresh(Page page, URL url, int requestedWait) throws IOException(Code) | | Refreshes the specified page using the specified URL after the specified number
of seconds.
Parameters: page - The page that is going to be refreshed. Parameters: url - The URL where the new page will be loaded. Parameters: requestedWait - The number of seconds to wait before reloading the page. If this isgreater than maxwait than maxwait will be used instead. throws: IOException - if the refresh fails |
|
|