/** * Close the client. Closing will close down any pooled connections. * Clients should always be closed after use. */ public void close() { delegate.close(); }
/** * Close the client. Closing will close down any pooled connections. * Clients should always be closed after use. */ public void close() { delegate.close(); }
@Override public void close() { webClient.close(); }
/** * Closes the client. */ public void close() { if (client != null) { client.close(); } }
@Override public void close(Handler<Void> completionHandler) { synchronized (this) { if (client != null) { client.close(); client = null; } } if (completionHandler != null) { completionHandler.handle(null); } }
private synchronized void closeOnContext(Handler<Void> completionHandler) { if (client != null) { client.close(); } if (completionHandler != null) { completionHandler.handle(null); } }
@Override public void stop() throws Exception { if (client != null) { client.close(); } circuit.close(); }
public void close() { client.close(); vertx.close(); }
public void close() { client.close(); vertx.close(); }
public void close() { client.close(); vertx.close(); }
protected void reconnect() { this.client.close(); connect(); }
private void testTLS(WebClientOptions clientOptions, HttpServerOptions serverOptions, Function<WebClient, HttpRequest<Buffer>> requestProvider, Consumer<HttpServerRequest> serverAssertions) throws Exception { WebClient sslClient = WebClient.create(vertx, clientOptions); HttpServer sslServer = vertx.createHttpServer(serverOptions); sslServer.requestHandler(req -> { assertEquals(serverOptions.isSsl(), req.isSSL()); if (serverAssertions != null) { serverAssertions.accept(req); } req.response().end(); }); try { startServer(sslServer); HttpRequest<Buffer> builder = requestProvider.apply(sslClient); builder.send(onSuccess(resp -> testComplete())); await(); } finally { sslClient.close(); sslServer.close(); } }