Multithreaded task manager for java