|
||||||||||
| 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()
Create a WaitingRefreshHandler that will always wait whatever time the server or content asks. |
|
WaitingRefreshHandler(int maxwait)
Create a WaitingRefreshHandler 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). A value
less than one (1) will cause WaitingRefreshHandler to wait for whatever time the server or content asks.public WaitingRefreshHandler()
| Method Detail |
|---|
public void handleRefresh(Page page,
URL url,
int requestedWait)
throws IOException
handleRefresh in interface RefreshHandlerpage - The page that is going to be refreshed.url - The URL where the new page will be loaded.requestedWait - The number of seconds to wait before reloading the page. If this is
greater than maxwait than 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 | |||||||||