Class JavaScriptExecutionJob
- java.lang.Object
-
- org.htmlunit.javascript.background.BasicJavaScriptJob
-
- org.htmlunit.javascript.background.JavaScriptExecutionJob
-
- All Implemented Interfaces:
java.lang.Comparable<JavaScriptJob>
,java.lang.Runnable
,JavaScriptJob
- Direct Known Subclasses:
JavaScriptFunctionJob
,JavaScriptStringJob
abstract class JavaScriptExecutionJob extends BasicJavaScriptJob
A JavaScript-triggered background job representing the execution of some JavaScript code.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
label_
The label for this job.private static org.apache.commons.logging.Log
LOG
Logging support.private java.lang.ref.WeakReference<WebWindow>
window_
The window to which this job belongs (weakly referenced, so as not to leak memory).
-
Constructor Summary
Constructors Constructor Description JavaScriptExecutionJob(int initialDelay, java.lang.Integer period, java.lang.String label, WebWindow window)
Creates a new JavaScript execution job, where the JavaScript code to execute is a string.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
run()
protected abstract void
runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.java.lang.String
toString()
-
Methods inherited from class org.htmlunit.javascript.background.BasicJavaScriptJob
compareTo, getId, getInitialDelay, getPeriod, getTargetExecutionTime, isExecuteAsap, isPeriodic, setId, setTargetExecutionTime
-
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
Logging support.
-
label_
private final java.lang.String label_
The label for this job.
-
window_
private final java.lang.ref.WeakReference<WebWindow> window_
The window to which this job belongs (weakly referenced, so as not to leak memory).
-
-
Constructor Detail
-
JavaScriptExecutionJob
JavaScriptExecutionJob(int initialDelay, java.lang.Integer period, java.lang.String label, WebWindow window)
Creates a new JavaScript execution job, where the JavaScript code to execute is a string.- Parameters:
initialDelay
- the initial amount of time to wait before executing this jobperiod
- the amount of time to wait between executions of this job (may benull
)label
- the label for the jobwindow
- the window to which the job belongs
-
-
Method Detail
-
run
public void run()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBasicJavaScriptJob
-
-