Example usage for io.vertx.core.http HttpClientOptions setUseAlpn

List of usage examples for io.vertx.core.http HttpClientOptions setUseAlpn

Introduction

In this page you can find the example usage for io.vertx.core.http HttpClientOptions setUseAlpn.

Prototype

@Override
    public HttpClientOptions setUseAlpn(boolean useAlpn) 

Source Link

Usage

From source file:org.apache.servicecomb.transport.rest.client.RestTransportClient.java

License:Apache License

private static HttpClientOptions createHttp2ClientOptions() {
    HttpClientOptions httpClientOptions = new HttpClientOptions();
    httpClientOptions.setUseAlpn(TransportClientConfig.getUseAlpn()).setHttp2ClearTextUpgrade(false)
            .setProtocolVersion(HttpVersion.HTTP_2)
            .setIdleTimeout(TransportClientConfig.getHttp2ConnectionIdleTimeoutInSeconds())
            .setHttp2MultiplexingLimit(TransportClientConfig.getHttp2MultiplexingLimit())
            .setHttp2MaxPoolSize(TransportClientConfig.getHttp2ConnectionMaxPoolSize())
            .setTryUseCompression(TransportClientConfig.getConnectionCompression());

    VertxTLSBuilder.buildHttpClientOptions(SSL_KEY, httpClientOptions);
    return httpClientOptions;
}