List of usage examples for io.vertx.core.http Http2Settings Http2Settings
public Http2Settings()
From source file:examples.HTTP2Examples.java
License:Open Source License
public void example20(HttpConnection connection) { connection.updateSettings(new Http2Settings().setMaxConcurrentStreams(100)); }
From source file:examples.HTTP2Examples.java
License:Open Source License
public void example21(HttpConnection connection) { connection.updateSettings(new Http2Settings().setMaxConcurrentStreams(100), ar -> { if (ar.succeeded()) { System.out.println("The settings update has been acknowledged "); }// w w w . j a va2s . c om }); }
From source file:org.apache.servicecomb.transport.rest.vertx.RestServerVerticle.java
License:Apache License
private HttpServerOptions createDefaultHttpServerOptions() { HttpServerOptions serverOptions = new HttpServerOptions(); serverOptions.setUsePooledBuffers(true); serverOptions.setIdleTimeout(TransportConfig.getConnectionIdleTimeoutInSeconds()); serverOptions.setCompressionSupported(TransportConfig.getCompressed()); serverOptions.setMaxHeaderSize(TransportConfig.getMaxHeaderSize()); serverOptions.setMaxInitialLineLength(TransportConfig.getMaxInitialLineLength()); if (endpointObject.isHttp2Enabled()) { serverOptions.setUseAlpn(TransportConfig.getUseAlpn()).setInitialSettings( new Http2Settings().setMaxConcurrentStreams(TransportConfig.getMaxConcurrentStreams())); }//from w w w .ja v a 2 s .c o m if (endpointObject.isSslEnabled()) { SSLOptionFactory factory = SSLOptionFactory.createSSLOptionFactory(SSL_KEY, null); SSLOption sslOption; if (factory == null) { sslOption = SSLOption.buildFromYaml(SSL_KEY); } else { sslOption = factory.createSSLOption(); } SSLCustom sslCustom = SSLCustom.createSSLCustom(sslOption.getSslCustomClass()); VertxTLSBuilder.buildNetServerOptions(sslOption, sslCustom, serverOptions); } return serverOptions; }