I'm new to java and I want to create a multi-threaded application as I'm gonna describe:
- There are two main objects a job and a jobRunner.
- jobRunner would be created at the beginning and it would fetch a list of strings describing jobs, then it would create a List of job objects.
- each job object has a method to run a series of actions in a separate thread. Using that, the jobRunner would run a bunch of jobs toghether on separate threads
- jobRunner has also a method to finilize and report back the job status and so each finished job needs to call back that method in it's parent object
My question is about the final step. How can an object inside another one call a method of it's preceding object? Or is it possible to pass an address of the jobRunner object to the job objects so that they would call the object by that address? Thank you for enlightening me :)