Module org.htmlunit

Interface JavaScriptJob

All Superinterfaces:
Comparable<JavaScriptJob>, Runnable
All Known Implementing Classes:
BasicJavaScriptJob

public interface JavaScriptJob extends Runnable, Comparable<JavaScriptJob>
A JavaScript-triggered background job managed by a JavaScriptJobManager.
Author:
Daniel Gredler, Amit Manjhi, Ronald Brill
  • Method Details

    • getId

      Integer getId()
      Returns the job ID.
      Returns:
      the job ID
    • setId

      void setId(Integer id)
      Sets the job ID.
      Parameters:
      id - the job ID
    • getTargetExecutionTime

      long getTargetExecutionTime()
      Returns the target execution time of the job.
      Returns:
      the target execution time in ms
    • setTargetExecutionTime

      void setTargetExecutionTime(long targetExecutionTime)
      Sets the target execution time of the job.
      Parameters:
      targetExecutionTime - the new target execution time.
    • getPeriod

      Integer getPeriod()
      Returns the amount of time to wait between executions of this job (perhaps null).
      Returns:
      the amount of time to wait between executions of this job (perhaps null)
    • isPeriodic

      boolean isPeriodic()
      Returns true if this job executes periodically.
      Returns:
      true if this job executes periodically
    • isExecuteAsap

      boolean isExecuteAsap()
      Returns:
      true if this has to be executed ASAP