io.vertx.core.http.Http2Settings Java Examples

The following examples show how to use io.vertx.core.http.Http2Settings. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestServerVerticle.java    From servicecomb-java-chassis with Apache License 2.0 6 votes vote down vote up
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()));
  }
  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;
}
 
Example #2
Source File: S3ClientOptions.java    From vertx-s3-client with Apache License 2.0 4 votes vote down vote up
@Override
public S3ClientOptions setInitialSettings(final Http2Settings settings) {
    super.setInitialSettings(settings);
    return this;
}
 
Example #3
Source File: WebClientOptions.java    From vertx-web with Apache License 2.0 4 votes vote down vote up
@Override
public WebClientOptions setInitialSettings(Http2Settings settings) {
  return (WebClientOptions) super.setInitialSettings(settings);
}
 
Example #4
Source File: ConsulClientOptions.java    From vertx-consul-client with Apache License 2.0 2 votes vote down vote up
/**
 * Set the HTTP/2 connection settings immediately sent by to the server when the client connects.
 *
 * @param settings the settings value
 * @return a reference to this, so the API can be used fluently
 */
@Override
public ConsulClientOptions setInitialSettings(Http2Settings settings) {
  return (ConsulClientOptions) super.setInitialSettings(settings);
}