Package org.htmlunit

Class NicelyResynchronizingAjaxController

java.lang.Object
org.htmlunit.AjaxController
org.htmlunit.NicelyResynchronizingAjaxController
All Implemented Interfaces:
Serializable

public class NicelyResynchronizingAjaxController extends AjaxController
This AjaxController resynchronizes calls calling from the main thread. The idea is that asynchronous AJAX calls performed directly in response to a user action (therefore in the "main" thread and not in the thread of a background task) are directly useful for the user. To easily have a testable state, these calls are performed synchronously.
See Also:
  • Constructor Details

    • NicelyResynchronizingAjaxController

      public NicelyResynchronizingAjaxController()
      Creates an instance.
  • Method Details

    • processSynchron

      public boolean processSynchron(HtmlPage page, WebRequest settings, boolean async)
      Resynchronizes calls performed from the thread where this instance has been created.

      Gets notified of an AJAX call to determine how it should be processed.

      Overrides:
      processSynchron in class AjaxController
      Parameters:
      page - the page the request comes from
      settings - the request that should be performed
      async - indicates if the request should originally be asynchronous
      Returns:
      if the call should be synchronous or not; here just like the original call