Example usage for io.vertx.core.http StreamResetException getCode

List of usage examples for io.vertx.core.http StreamResetException getCode

Introduction

In this page you can find the example usage for io.vertx.core.http StreamResetException getCode.

Prototype

public long getCode() 

Source Link

Usage

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example5(HttpServerRequest request) {

    request.response().exceptionHandler(err -> {
        if (err instanceof StreamResetException) {
            StreamResetException reset = (StreamResetException) err;
            System.out.println("Stream reset " + reset.getCode());
        }/*w ww . j  a va  2 s.  c  om*/
    });
}

From source file:examples.HTTP2Examples.java

License:Open Source License

public void example12(HttpClientRequest request) {

    request.exceptionHandler(err -> {
        if (err instanceof StreamResetException) {
            StreamResetException reset = (StreamResetException) err;
            System.out.println("Stream reset " + reset.getCode());
        }//from www  .ja  v a2 s . co m
    });
}