Example usage for io.vertx.core.http HttpConnection shutdownHandler

List of usage examples for io.vertx.core.http HttpConnection shutdownHandler

Introduction

In this page you can find the example usage for io.vertx.core.http HttpConnection shutdownHandler.

Prototype

@Fluent
HttpConnection shutdownHandler(@Nullable Handler<Void> handler);

Source Link

Document

Set an handler called when a GOAWAY frame has been sent or received and all connections are closed.

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example28(HttpConnection connection) {
    connection.goAway(0);/*w w  w .  j a va  2 s  .  c  om*/
    connection.shutdownHandler(v -> {

        // All streams are closed, close the connection
        connection.close();
    });
}