Пример #1
0
 private void makeRequest() {
   if (start == 0) {
     start = System.currentTimeMillis();
   }
   while (requestCredits > 0) {
     startTimeMs.add(System.currentTimeMillis());
     client.getNow("/", this);
     requestCredits--;
   }
 }
Пример #2
0
 /**
  * This is a quick version of the {@link #get(String, org.vertx.java.core.Handler) get()} method
  * where you do not want to do anything with the request before sending.
  *
  * <p>Normally with any of the HTTP methods you create the request then when you are ready to send
  * it you call {@link HttpClientRequest#end()} on it. With this method the request is immediately
  * sent.
  *
  * <p>When an HTTP response is received from the server the {@code responseHandler} is called
  * passing in the response.
  */
 public void getNow(String uri, Handler<HttpClientResponse> responseHandler) {
   getNow(uri, null, responseHandler);
 }