本文整理了Java中io.vertx.ext.web.client.WebClient.close()
方法的一些代码示例,展示了WebClient.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.close()
方法的具体详情如下:
包路径:io.vertx.ext.web.client.WebClient
类名称:WebClient
方法名:close
暂无
代码示例来源:origin: vert-x3/vertx-rx
/**
* Close the client. Closing will close down any pooled connections.
* Clients should always be closed after use.
*/
public void close() {
delegate.close();
}
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* Close the client. Closing will close down any pooled connections.
* Clients should always be closed after use.
*/
public void close() {
delegate.close();
}
代码示例来源:origin: io.vertx/vertx-consul-client
@Override
public void close() {
webClient.close();
}
代码示例来源:origin: vert-x3/vertx-config
/**
* Closes the client.
*/
public void close() {
if (client != null) {
client.close();
}
}
代码示例来源:origin: vert-x3/vertx-service-discovery
@Override
public void close(Handler<Void> completionHandler) {
synchronized (this) {
if (client != null) {
client.close();
client = null;
}
}
if (completionHandler != null) {
completionHandler.handle(null);
}
}
代码示例来源:origin: vert-x3/vertx-config
private synchronized void closeOnContext(Handler<Void> completionHandler) {
if (client != null) {
client.close();
}
if (completionHandler != null) {
completionHandler.handle(null);
}
}
代码示例来源:origin: cescoffier/vertx-microservices-workshop
@Override
public void stop() throws Exception {
if (client != null) {
client.close();
}
circuit.close();
}
代码示例来源:origin: EnMasseProject/enmasse
public void close() {
client.close();
vertx.close();
}
代码示例来源:origin: EnMasseProject/enmasse
public void close() {
client.close();
vertx.close();
}
代码示例来源:origin: EnMasseProject/enmasse
public void close() {
client.close();
vertx.close();
}
代码示例来源:origin: EnMasseProject/enmasse
protected void reconnect() {
this.client.close();
connect();
}
代码示例来源:origin: io.vertx/vertx-web-client
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();
}
}
内容来源于网络,如有侵权,请联系作者删除!