com.gargoylesoftware.htmlunit.javascript.background
Class JavaScriptExecutionJob

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJob
      extended by com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob
All Implemented Interfaces:
Comparable<JavaScriptJob>, Runnable
Direct Known Subclasses:
JavaScriptFunctionJob, JavaScriptStringJob

public abstract class JavaScriptExecutionJob
extends JavaScriptJob

A JavaScript-triggered background job representing the execution of some JavaScript code.

Version:
$Revision: 5559 $
Author:
Daniel Gredler
See Also:
MemoryLeakTest

Constructor Summary
JavaScriptExecutionJob(int initialDelay, Integer period, String label, WebWindow window)
          Creates a new JavaScript execution job, where the JavaScript code to execute is a string.
 
Method Summary
 void run()
          
protected abstract  void runJavaScript(HtmlPage page)
          Run the JavaScript from the concrete class.
 String toString()
          
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJob
compareTo, getId, getInitialDelay, getPeriod, getTargetExecutionTime, isPeriodic, setId, setTargetExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaScriptExecutionJob

public JavaScriptExecutionJob(int initialDelay,
                              Integer period,
                              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 job
period - the amount of time to wait between executions of this job (may be null)
label - the label for the job
window - the window to which the job belongs
Method Detail

run

public void run()


toString

public String toString()

Overrides:
toString in class JavaScriptJob

runJavaScript

protected abstract void runJavaScript(HtmlPage page)
Run the JavaScript from the concrete class.

Parameters:
page - the HtmlPage that owns the script


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.