com.gargoylesoftware.htmlunit.javascript.background
Class GAEJavaScriptExecutor

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

public class GAEJavaScriptExecutor
extends DefaultJavaScriptExecutor

INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Google App Engine specific subclass to facilitate execution of JS jobs.

Version:
$Revision: 9112 $
Author:
Amit Manjhi, Kostadin Chikov, Ronald Brill
See Also:
Serialized Form

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.DefaultJavaScriptExecutor
addWindow, getJobManagerWithEarliestJob, getThreadName, 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 DefaultJavaScriptExecutor

pumpEventLoop

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

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


Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.