com.gargoylesoftware.htmlunit
Class NicelyResynchronizingAjaxController

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.AjaxController
      extended by com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
All Implemented Interfaces:
java.io.Serializable

public class NicelyResynchronizingAjaxController
extends AjaxController

This AjaxController resynchronizes calls calling from the main thread. The idea is that asynchron 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 synchron. EXPERIMENTAL - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.

Version:
$Revision: 1.3 $
Author:
Marc Guillemot
See Also:
Serialized Form

Constructor Summary
NicelyResynchronizingAjaxController()
 Create an instance.
 
Method Summary
 boolean processSynchron(HtmlPage page, WebRequestSettings requestSettings, boolean async)
 Resynchronizes calls performed from the thread where this instance has been created.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NicelyResynchronizingAjaxController

public NicelyResynchronizingAjaxController()
Create an instance.

Method Detail

processSynchron

public boolean processSynchron(HtmlPage page,
                               WebRequestSettings requestSettings,
                               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
requestSettings - the request that should be performed
async - indicates if the request should originally be asynchron
Returns:
if the call should be synchron or not. Here just like the original call.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.