|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.WaitingRefreshHandler
public class WaitingRefreshHandler
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
.
Constructor Summary | |
---|---|
WaitingRefreshHandler()
Creates a new refresh handler that will always wait whatever time the server or content asks. |
|
WaitingRefreshHandler(int maxwait)
Creates a new refresh handler that will wait whatever time the server or content asks, unless it it longer than maxwait. |
Method Summary | |
---|---|
void |
handleRefresh(Page page,
URL url,
int requestedWait)
Refreshes the specified page using the specified URL after the specified number of seconds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaitingRefreshHandler(int maxwait)
maxwait
- the maximum wait time before the refresh (in seconds)public WaitingRefreshHandler()
Method Detail |
---|
public void handleRefresh(Page page, URL url, int requestedWait) throws IOException
handleRefresh
in interface RefreshHandler
page
- the page that is going to be refreshedurl
- the URL where the new page will be loadedrequestedWait
- the number of seconds to wait before reloading the page; if this is
greater than maxwait then maxwait will be used instead
IOException
- if the refresh fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |