title: Spring TaskExecutor :How to get notifed when all task complete execution and also if they dont in some time slot
body: <p>I am new to java programming and I am stuck at a problem. I am using Spring <code>TaskExecutor</code> Interface for thread pool management. I have to extract content from different sources (Http, Files, Databse) in parallel so I have used the <code>TaskExecutor</code> for this.
  Now I want that once all threads are done with execution it should indicate the <code>TaskExecutor</code>, also if they have not completed execution in 4 seconds that tasks should be terminated . So i am stuck with this problem. I tried using the callable interface with future but that causes task to be executed in sync but i need async. Please help me out. </p>