I have implemented Executor Service in my code
ExecutorService service = Executors.newSingleThreadExecutor(); Runnable r; String timeout=\'30000\'; try {