@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(); }
server.connectionHandler(conn -> { otherContext.runOnContext(v -> { conn.updateSettings(expectedSettings); }); });
}).exceptionHandler(this::fail).connectionHandler(conn -> { vertx.runOnContext(v -> { conn.updateSettings(updatedSettings, ar -> { end.complete(); });
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
@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(); }
server.connectionHandler(conn -> { otherContext.runOnContext(v -> { conn.updateSettings(expectedSettings); }); });
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) {
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) {
}).exceptionHandler(this::fail).connectionHandler(conn -> { vertx.runOnContext(v -> { conn.updateSettings(updatedSettings, ar -> { end.complete(); });