Interface JavaScriptJob

All Superinterfaces:
Comparable<JavaScriptJob>, Runnable
All Known Implementing Classes:
BasicJavaScriptJob, JavaScriptExecutionJob, JavaScriptFunctionJob, JavaScriptStringJob, JavascriptXMLHttpRequestJob, WorkerJob

public interface JavaScriptJob extends Runnable, Comparable<JavaScriptJob>
A JavaScript-triggered background job managed by a JavaScriptJobManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the job ID.
    Returns the amount of time to wait between executions of this job (may be null).
    long
    Returns the target execution time of the job.
    boolean
    Returns true if has to be executed ASAP.
    boolean
    Returns true if this job executes periodically.
    void
    Sets the job ID.
    void
    setTargetExecutionTime(long targetExecutionTime)
    Sets the target execution time of the job.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface java.lang.Runnable

    run
  • 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 (may be null).
      Returns:
      the amount of time to wait between executions of this job (may be null)
    • isPeriodic

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

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