Class JobManager

java.lang.Object
org.opensourcephysics.tools.JobManager

public class JobManager extends Object
This manages jobs and their associated objects and replies.
Version:
1.0
Author:
Wolfgang Christian and Doug Brown
  • Constructor Details

    • JobManager

      public JobManager(Tool tool)
      Constructs a job manager for a specified tool.
      Parameters:
      tool - the tool
  • Method Details

    • log

      public void log(Job job, Tool tool)
      Logs a job and tool into the manager.
      Parameters:
      job - the job
      tool - a tool interested in the job
    • associate

      public void associate(Job job, Object obj)
      Associates a job with the specified object.
      Parameters:
      job - the job
      obj - the object
    • getJobs

      public Job[] getJobs(Object obj)
      Gets the jobs associated with the specified object.
      Parameters:
      obj - the object
      Returns:
      an array of Jobs
    • getObjects

      public Object[] getObjects(Job job)
      Gets the objects associated with the specified job.
      Parameters:
      job - the job
      Returns:
      an array of objects
    • getTools

      public Collection<Tool> getTools(Object obj)
      Gets the tools interested in the specified object.
      Parameters:
      obj - the object
      Returns:
      a collection of tools
    • sendReplies

      public void sendReplies(Object obj)
      Replies to tools interested in the specified object.
      Parameters:
      obj - the object
    • sendReplies

      public void sendReplies(Job job)
      Replies to tools interested in the specified job.
      Parameters:
      job - the job