JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit

Class WaitingRefreshHandler

  • All Implemented Interfaces:
    RefreshHandler


    public class WaitingRefreshHandler
    extends Object
    implements RefreshHandler 
    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.

    Author:
    Mike Bowler, Daniel Gredler, Sven Strickroth
    • Constructor Summary

      Constructors
      Constructor and Description
      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.
    • Constructor Detail

      • WaitingRefreshHandler

        public WaitingRefreshHandler(int maxwait)
        Creates a new refresh handler that will wait whatever time the server or content asks, unless it it longer than maxwait. A value of maxwait that is less than 1 will cause the refresh handler to always wait for whatever time the server or content requests.
        Parameters:
        maxwait - the maximum wait time before the refresh (in seconds)
      • WaitingRefreshHandler

        public WaitingRefreshHandler()
        Creates a new refresh handler that will always wait whatever time the server or content asks.
    • Method Detail

      • handleRefresh

        public void handleRefresh(Page page,
         URL url,
         int requestedWait)
         throws IOException 
        Refreshes the specified page using the specified URL after the specified number of seconds.
        Specified by:
        handleRefresh in interface RefreshHandler
        Parameters:
        page - 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 then maxwait will be used instead
        Throws:
        IOException - if the refresh fails
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /