public class JavaScriptExecutor extends Object implements Runnable, Serializable
Constructor and Description |
---|
JavaScriptExecutor(WebClient webClient)
Creates an EventLoop for the webClient.
|
Modifier and Type | Method and Description |
---|---|
void |
addWindow(WebWindow newWindow)
Register a window with the eventLoop.
|
protected JavaScriptJobManager |
getJobManagerWithEarliestJob()
Returns the JobExecutor corresponding to the earliest job.
|
int |
pumpEventLoop(long timeoutMillis)
Executes the jobs in the eventLoop till timeoutMillis expires or the eventLoop becomes empty.
|
void |
run()
Runs the eventLoop.
|
void |
shutdown()
Notes that this thread has been shutdown.
|
protected void |
startThreadIfNeeded()
Starts the eventLoopThread_.
|
public JavaScriptExecutor(WebClient webClient)
webClient
- the provided webClientprotected void startThreadIfNeeded()
protected JavaScriptJobManager getJobManagerWithEarliestJob()
public int pumpEventLoop(long timeoutMillis)
timeoutMillis
- the timeout in millisecondspublic void addWindow(WebWindow newWindow)
newWindow
- the new web windowpublic void shutdown()
Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.