Implemented all the points mentioned above except:
The JobMonitor::process method can probably be removed, since it doesn't do any meaningful work (the instance is instead passed to the downstream StatsCollector, which does). The monitor is then only responsible for determining when the job is done, not its outcome The unit test can subclass the downstream component instead of subclassing JobMonitor
The above is not done , due to time constraints and also extend Statistics is taking time. Will open the new jira where we will remove the process method.
For the question:
If a job fails submission in serial mode, wil the JobFactory be woken up?