|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor
public class DefaultJavaScriptExecutor
An event loop to execute all the JavaScript jobs.
| Constructor Summary | |
|---|---|
DefaultJavaScriptExecutor(WebClient webClient)
Creates an EventLoop for the webClient. |
|
| Method Summary | |
|---|---|
void |
addWindow(WebWindow newWindow)
Register a window with the eventLoop. |
protected JavaScriptJobManager |
getJobManagerWithEarliestJob()
Returns the JobExecutor corresponding to the earliest job. |
protected String |
getThreadName()
Defines the thread name; overload if needed. |
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 DefaultJavaScriptExecutor(WebClient webClient)
webClient - the provided webClient| Method Detail |
|---|
protected void startThreadIfNeeded()
protected String getThreadName()
protected JavaScriptJobManager getJobManagerWithEarliestJob()
public int pumpEventLoop(long timeoutMillis)
pumpEventLoop in interface JavaScriptExecutortimeoutMillis - the timeout in milliseconds
public void run()
run in interface Runnablepublic void addWindow(WebWindow newWindow)
addWindow in interface JavaScriptExecutornewWindow - the new web windowpublic void shutdown()
shutdown in interface JavaScriptExecutor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||