title: REST - getting Response with a delay
body: <p>I want to get Response with a delay and using for it<br>
  <code>future.get(1000, TimeUnit.SECONDS);</code>. I get response almost immediately but the Eclipse process does not finish for aboute a minute or similair. It looks like memory leak. </p>
  
  <p>So, is it a proper way to get Response with a delay? And why it takes too much time to finish the process?</p>
  
  <pre><code>HttpAuthenticationFeature httpFeature = HttpAuthenticationFeature.basic("admin", "admin");
  final Client client = ClientBuilder.newClient();
  client.register(httpFeature);
  Future&lt;Response&gt; future = client.target(webServiceURI).request(MediaType.TEXT_PLAIN).async().get();
  Response response = null;
  try {
      response = future.get(1000, TimeUnit.SECONDS);
      } catch (InterruptedException | ExecutionException | TimeoutException e) {
          e.printStackTrace();
      }
  Object result = response.getEntity();
  System.out.println(result);
  client.close();   
  </code></pre>