Class JobRunner

java.lang.Object
net.sf.basedb.clients.jobagent.JobRunner
All Implemented Interfaces:
Runnable

public class JobRunner
extends Object
implements Runnable
A runnable class that makes it possible to execute each job in it's own thread. When the agent has found a job to execute it creates one instance of this class and creates a new thread for it to run in. This class checks that there is a free slot available and then uses the configured JobExecutor for the actual execution of the job.
Version:
2.0
Author:
nicklas
Last modified
$Date: 2021-06-04 12:40:45 +0200 (Fri, 04 Jun 2021) $
  • Field Details

    • log

      private static final org.slf4j.Logger log
      Log job agent events.
    • job

      private final Job job
    • settings

      private final JobAgentSettings settings
    • jobExecutor

      private final JobExecutor jobExecutor
    • agent

      private final Agent agent
  • Constructor Details

    • JobRunner

      JobRunner​(Agent agent, Job job, JobAgentSettings settings, JobExecutor jobExecutor)
      Create a new job execution thread.
      Parameters:
      agent - The agent that created this object
      job - The job to be executed
      settings - The settigns for the plugin that is executing the job
      jobExecutor - The job executor that should execute the job
  • Method Details