Class JobExecutor

java.lang.Object
org.codelibs.fess.job.JobExecutor
Direct Known Subclasses:
ScriptExecutor

public abstract class JobExecutor extends Object
Abstract base class for job executors that handle script execution within the job system. This class provides a framework for executing scripts and managing shutdown operations.
  • Field Details

  • Constructor Details

    • JobExecutor

      public JobExecutor()
      Default constructor.
  • Method Details

    • execute

      public abstract Object execute(String scriptType, String script)
      Executes a script with the specified script type and content.
      Parameters:
      scriptType - the type of script to execute
      script - the script content to execute
      Returns:
      the result of script execution
    • shutdown

      public void shutdown()
      Initiates shutdown of the job executor. This method notifies the shutdown listener to perform cleanup operations.
    • addShutdownListener

      public void addShutdownListener(JobExecutor.ShutdownListener listener)
      Adds a shutdown listener to be notified when the executor is shutting down.
      Parameters:
      listener - the shutdown listener to add