|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor
public class JavaScriptExecutor
An event loop to execute all the JavaScript jobs.
Nested Class Summary | |
---|---|
protected class |
JavaScriptExecutor.JobExecutor
A simple class to store a JavaScriptJobManager and its earliest job. |
Constructor Summary | |
---|---|
JavaScriptExecutor(WebClient webClient)
Creates an EventLoop for the webClient. |
Method Summary | |
---|---|
void |
addWindow(WebWindow newWindow)
Register a window with the eventLoop. |
protected JavaScriptExecutor.JobExecutor |
getEarliestJob()
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_. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaScriptExecutor(WebClient webClient)
webClient
- the provided webClientMethod Detail |
---|
protected void startThreadIfNeeded()
protected JavaScriptExecutor.JobExecutor getEarliestJob()
public int pumpEventLoop(long timeoutMillis)
timeoutMillis
- the timeout in milliseconds
public void run()
run
in interface Runnable
public void addWindow(WebWindow newWindow)
newWindow
- the new web windowpublic void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |