com.gargoylesoftware.htmlunit.javascript.background
Class GAEJavaScriptExecutor

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor
      extended by com.gargoylesoftware.htmlunit.javascript.background.GAEJavaScriptExecutor
All Implemented Interfaces:
Serializable, Runnable

public class GAEJavaScriptExecutor
extends JavaScriptExecutor

Google App Engine specific subclass to facilitate execution of JS jobs.

Version:
$Revision: 5842 $
Author:
Amit Manjhi
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor
JavaScriptExecutor.JobExecutor
 
Constructor Summary
GAEJavaScriptExecutor(WebClient webClient)
          Creates an EventLoop for the webClient.
 
Method Summary
 int pumpEventLoop(long timeoutMillis)
          Executes the jobs in the eventLoop till timeoutMillis expires or the eventLoop becomes empty.
protected  void startThreadIfNeeded()
          Starts the eventLoopThread_.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor
addWindow, getEarliestJob, run, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GAEJavaScriptExecutor

public GAEJavaScriptExecutor(WebClient webClient)
Creates an EventLoop for the webClient.

Parameters:
webClient - the provided webClient
Method Detail

startThreadIfNeeded

protected void startThreadIfNeeded()
Starts the eventLoopThread_.

Overrides:
startThreadIfNeeded in class JavaScriptExecutor

pumpEventLoop

public int pumpEventLoop(long timeoutMillis)
Executes the jobs in the eventLoop till timeoutMillis expires or the eventLoop becomes empty.

Overrides:
pumpEventLoop in class JavaScriptExecutor
Parameters:
timeoutMillis - the timeout in milliseconds
Returns:
the number of jobs executed


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