Deprecate HTTP client request connection handler #3212 - closes

This commit is contained in:
Julien Viet
2019-12-01 18:13:24 +01:00
parent ee7e9b6b1b
commit 89ad79797d
3 changed files with 5 additions and 3 deletions

View File

@@ -1369,7 +1369,7 @@ The {@link io.vertx.core.http.HttpClientRequest#connection()} method returns the
{@link examples.HTTP2Examples#example18}
----
A connection handler can be set on the request to be notified when the connection happens:
A connection handler can be set on the client to be notified when a connection has been established happens:
[source,$lang]
----

View File

@@ -214,8 +214,8 @@ public class HTTP2Examples {
HttpConnection connection = request.connection();
}
public void example19(HttpClientRequest request) {
request.connectionHandler(connection -> {
public void example19(HttpClient client) {
client.connectionHandler(connection -> {
System.out.println("Connected to the server");
});
}

View File

@@ -427,7 +427,9 @@ public interface HttpClientRequest extends WriteStream<Buffer>, ReadStream<HttpC
*
* @param handler the handler
* @return a reference to this, so the API can be used fluently
* @deprecated instead use {@link HttpClient#connectionHandler(Handler)}
*/
@Deprecated
@Fluent
HttpClientRequest connectionHandler(@Nullable Handler<HttpConnection> handler);