com.gargoylesoftware.htmlunit.javascript.background
Class GAEJavaScriptExecutor
java.lang.Object
com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GAEJavaScriptExecutor
public GAEJavaScriptExecutor(WebClient webClient)
- Creates an EventLoop for the webClient.
- Parameters:
webClient
- the provided webClient
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.