Hey, I am looking for a way where a threadpool of threads (for exp 5 threads) are making calls to rest api & after returning answer from that request, they must immediately go & make the same request again, this process must continue until the application itself is terminated. Please if anyone of you has any idea about it's implementation, it would be highly appreciated. That's my code but I am looking for a more effective implementation
public class APIclient2 {
	  static ExecutorService executorService = Executors.newFixedThreadPool(5);
	  static CompletionService<Boolean> executorCompletionService= new ExecutorCompletionService<>(executorService);

	  public void getCallsUsingUnirest() throws Exception {
	    for (int i = 0;i<5; i++) {
	    		assignNewTask();
	          }
	  while(true) {
	    	 Boolean result = executorCompletionService.take().get();
	    	if(result) {
		    	Thread.sleep(1000);//for readable purpose
	         	assignNewTask();
	    	}
	    }
	    }

	public static void assignNewTask() {
		System.out.println("assigning new task");
    	executorCompletionService.submit(new testTask());
	}

	  }

class testTask implements Callable<Boolean>{

	@Override
	public Boolean call() throws Exception {

		System.out.println(Unirest.get("http://localhost:8081/hello").asString().getBody()
				+" : " + Thread.currentThread().getId());
		return true;
	}

}