com.gargoylesoftware.htmlunit.javascript.background
Interface JavaScriptExecutor

All Superinterfaces:
Runnable, Serializable
All Known Implementing Classes:
DefaultJavaScriptExecutor

public interface JavaScriptExecutor
extends Runnable, Serializable

An event loop to execute all the JavaScript jobs.

Version:
$Revision: 6701 $
Author:
Amit Manjhi, Kostadin Chikov, Ronald Brill

Method Summary
 void addWindow(WebWindow newWindow)
          Register a window with the eventLoop.
 int pumpEventLoop(long timeoutMillis)
          Executes the jobs in the eventLoop till timeoutMillis expires or the eventLoop becomes empty.
 void shutdown()
          Notes that this thread has been shutdown.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

addWindow

void addWindow(WebWindow newWindow)
Register a window with the eventLoop.

Parameters:
newWindow - the new web window

shutdown

void shutdown()
Notes that this thread has been shutdown.


pumpEventLoop

int pumpEventLoop(long timeoutMillis)
Executes the jobs in the eventLoop till timeoutMillis expires or the eventLoop becomes empty. No use in non-GAE mode.

Parameters:
timeoutMillis - the timeout in milliseconds
Returns:
the number of jobs executed


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.