io.vertx.core.http.HttpConnection.updateSettings()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中io.vertx.core.http.HttpConnection.updateSettings()方法的一些代码示例,展示了HttpConnection.updateSettings()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpConnection.updateSettings()方法的具体详情如下:
包路径:io.vertx.core.http.HttpConnection
类名称:HttpConnection
方法名:updateSettings

HttpConnection.updateSettings介绍

[英]Send to the remote endpoint an update of the server settings.

This is not implemented for HTTP/1.x.
[中]向远程端点发送服务器设置的更新。
这不是为HTTP/1实现的。十、

代码示例

代码示例来源:origin: eclipse-vertx/vert.x

@Test
public void testInitialMaxConcurrentStreamZero() throws Exception {
 server.close();
 server = vertx.createHttpServer(createBaseServerOptions().setInitialSettings(new Http2Settings().setMaxConcurrentStreams(0)));
 server.requestHandler(req -> {
  req.response().end();
 });
 server.connectionHandler(conn -> {
  vertx.setTimer(500, id -> {
   conn.updateSettings(new Http2Settings().setMaxConcurrentStreams(10));
  });
 });
 startServer();
 client.get(DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, DEFAULT_TEST_URI, resp -> {
  testComplete();
 }).connectionHandler(conn -> {
  assertEquals(10, conn.remoteSettings().getMaxConcurrentStreams());
 }).setTimeout(10000).exceptionHandler(this::fail).end();
 await();
}

代码示例来源:origin: eclipse-vertx/vert.x

server.connectionHandler(conn -> {
 otherContext.runOnContext(v -> {
  conn.updateSettings(expectedSettings);
 });
});

代码示例来源:origin: eclipse-vertx/vert.x

}).exceptionHandler(this::fail).connectionHandler(conn -> {
 vertx.runOnContext(v -> {
  conn.updateSettings(updatedSettings, ar -> {
   end.complete();
  });

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Send to the remote endpoint an update of the server settings.
 * <p/>
 * This is not implemented for HTTP/1.x.
 * @param settings the new settings
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.core.http.HttpConnection updateSettings(Http2Settings settings) { 
 delegate.updateSettings(settings);
 return this;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Send to the remote endpoint an update of the server settings.
 * <p/>
 * This is not implemented for HTTP/1.x.
 * @param settings the new settings
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.core.http.HttpConnection updateSettings(Http2Settings settings) { 
 delegate.updateSettings(settings);
 return this;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Send to the remote endpoint an update of this endpoint settings
 * <p/>
 * The <code>completionHandler</code> will be notified when the remote endpoint has acknowledged the settings.
 * <p/>
 * This is not implemented for HTTP/1.x.
 * @param settings the new settings
 * @param completionHandler the handler notified when the settings have been acknowledged by the remote endpoint
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.core.http.HttpConnection updateSettings(Http2Settings settings, Handler<AsyncResult<Void>> completionHandler) { 
 delegate.updateSettings(settings, completionHandler);
 return this;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Send to the remote endpoint an update of this endpoint settings
 * <p/>
 * The <code>completionHandler</code> will be notified when the remote endpoint has acknowledged the settings.
 * <p/>
 * This is not implemented for HTTP/1.x.
 * @param settings the new settings
 * @param completionHandler the handler notified when the settings have been acknowledged by the remote endpoint
 * @return a reference to this, so the API can be used fluently
 */
public io.vertx.rxjava.core.http.HttpConnection updateSettings(Http2Settings settings, Handler<AsyncResult<Void>> completionHandler) { 
 delegate.updateSettings(settings, completionHandler);
 return this;
}

代码示例来源:origin: io.vertx/vertx-core

@Test
public void testInitialMaxConcurrentStreamZero() throws Exception {
 server.close();
 server = vertx.createHttpServer(createBaseServerOptions().setInitialSettings(new Http2Settings().setMaxConcurrentStreams(0)));
 server.requestHandler(req -> {
  req.response().end();
 });
 server.connectionHandler(conn -> {
  vertx.setTimer(500, id -> {
   conn.updateSettings(new Http2Settings().setMaxConcurrentStreams(10));
  });
 });
 startServer();
 client.get(DEFAULT_HTTP_PORT, DEFAULT_HTTP_HOST, DEFAULT_TEST_URI, resp -> {
  testComplete();
 }).connectionHandler(conn -> {
  assertEquals(10, conn.remoteSettings().getMaxConcurrentStreams());
 }).setTimeout(10000).exceptionHandler(this::fail).end();
 await();
}

代码示例来源:origin: io.vertx/vertx-core

server.connectionHandler(conn -> {
 otherContext.runOnContext(v -> {
  conn.updateSettings(expectedSettings);
 });
});

代码示例来源:origin: io.vertx/vertx-lang-groovy

public static io.vertx.core.http.HttpConnection updateSettings(io.vertx.core.http.HttpConnection j_receiver, java.util.Map<String, Object> settings) {
 io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateSettings(settings != null ? new io.vertx.core.http.Http2Settings(io.vertx.core.impl.ConversionHelper.toJsonObject(settings)) : null));
 return j_receiver;
}
public static io.vertx.core.http.HttpConnection updateSettings(io.vertx.core.http.HttpConnection j_receiver, java.util.Map<String, Object> settings, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler) {

代码示例来源:origin: io.vertx/vertx-lang-groovy

public static io.vertx.core.http.HttpConnection updateSettings(io.vertx.core.http.HttpConnection j_receiver, java.util.Map<String, Object> settings, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> completionHandler) {
 io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.updateSettings(settings != null ? new io.vertx.core.http.Http2Settings(io.vertx.core.impl.ConversionHelper.toJsonObject(settings)) : null,
  completionHandler != null ? new io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>() {
  public void handle(io.vertx.core.AsyncResult<java.lang.Void> ar) {
   completionHandler.handle(ar.map(event -> io.vertx.core.impl.ConversionHelper.fromObject(event)));
  }
 } : null));
 return j_receiver;
}
public static java.util.Map<String, Object> remoteSettings(io.vertx.core.http.HttpConnection j_receiver) {

代码示例来源:origin: io.vertx/vertx-core

}).exceptionHandler(this::fail).connectionHandler(conn -> {
 vertx.runOnContext(v -> {
  conn.updateSettings(updatedSettings, ar -> {
   end.complete();
  });

相关文章