Package org.htmlunit
Class AjaxController
java.lang.Object
org.htmlunit.AjaxController
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NicelyResynchronizingAjaxController
This class is notified when AJAX calls are made, and has the ability to influence these calls.
For instance, it can turn asynchronous AJAX calls into synchronous AJAX calls, making test code
deterministic and avoiding calls to
Thread.sleep()
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
processSynchron
(HtmlPage page, WebRequest request, boolean async) Gets notified of an AJAX call to determine how it should be processed.
-
Constructor Details
-
AjaxController
public AjaxController()
-
-
Method Details
-
processSynchron
Gets notified of an AJAX call to determine how it should be processed.- Parameters:
page
- the page the request comes fromrequest
- the request that should be performedasync
- indicates if the request should originally be asynchronous- Returns:
- if the call should be synchronous or not; here just like the original call
-