Package org.opensourcephysics.tools
Class JobManager
java.lang.Object
org.opensourcephysics.tools.JobManager
This manages jobs and their associated objects and replies.
- Version:
- 1.0
- Author:
- Wolfgang Christian and Doug Brown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Associates a job with the specified object.Job[]
Gets the jobs associated with the specified object.Object[]
getObjects
(Job job) Gets the objects associated with the specified job.Gets the tools interested in the specified object.void
Logs a job and tool into the manager.void
sendReplies
(Object obj) Replies to tools interested in the specified object.void
sendReplies
(Job job) Replies to tools interested in the specified job.
-
Constructor Details
-
JobManager
Constructs a job manager for a specified tool.- Parameters:
tool
- the tool
-
-
Method Details
-
log
Logs a job and tool into the manager.- Parameters:
job
- the jobtool
- a tool interested in the job
-
associate
Associates a job with the specified object.- Parameters:
job
- the jobobj
- the object
-
getJobs
Gets the jobs associated with the specified object.- Parameters:
obj
- the object- Returns:
- an array of Jobs
-
getObjects
Gets the objects associated with the specified job.- Parameters:
job
- the job- Returns:
- an array of objects
-
getTools
Gets the tools interested in the specified object.- Parameters:
obj
- the object- Returns:
- a collection of tools
-
sendReplies
Replies to tools interested in the specified object.- Parameters:
obj
- the object
-
sendReplies
Replies to tools interested in the specified job.- Parameters:
job
- the job
-