case "maxHeaderListSize": if (member.getValue() instanceof Number) { obj.setMaxHeaderListSize(((Number)member.getValue()).longValue());
case 6: Arguments.require(value <= Integer.MAX_VALUE, "maxHeaderListSize must be <= " + Integer.MAX_VALUE); setMaxHeaderListSize((int) value); break; default:
converted.setMaxHeaderListSize(maxHeaderListSize);
/** * Create random {@link Http2Settings} with valid values. * * @return the random settings */ public static Http2Settings randomHttp2Settings() { long headerTableSize = 10 + randomPositiveInt() % (Http2CodecUtil.MAX_HEADER_TABLE_SIZE - 10); boolean enablePush = randomBoolean(); long maxConcurrentStreams = 10 + randomPositiveLong() % (Http2CodecUtil.MAX_CONCURRENT_STREAMS - 10); int initialWindowSize = 10 + randomPositiveInt() % (Http2CodecUtil.MAX_INITIAL_WINDOW_SIZE - 10); int maxFrameSize = Http2CodecUtil.MAX_FRAME_SIZE_LOWER_BOUND + randomPositiveInt() % (Http2CodecUtil.MAX_FRAME_SIZE_UPPER_BOUND - Http2CodecUtil.MAX_FRAME_SIZE_LOWER_BOUND); long maxHeaderListSize = 10 + randomPositiveLong() % (Http2CodecUtil.MAX_HEADER_LIST_SIZE - 10); Http2Settings settings = new Http2Settings(); settings.setHeaderTableSize(headerTableSize); settings.setPushEnabled(enablePush); settings.setMaxConcurrentStreams(maxConcurrentStreams); settings.setInitialWindowSize(initialWindowSize); settings.setMaxFrameSize(maxFrameSize); settings.setMaxHeaderListSize(maxHeaderListSize); settings.set('\u0007', (randomPositiveLong() & 0xFFFFFFFFL)); return settings; }
case "maxHeaderListSize": if (member.getValue() instanceof Number) { obj.setMaxHeaderListSize(((Number)member.getValue()).longValue());
case 6: Arguments.require(value <= Integer.MAX_VALUE, "maxHeaderListSize must be <= " + Integer.MAX_VALUE); setMaxHeaderListSize((int) value); break; default:
assertSame(settings, settings.setPushEnabled(update.isPushEnabled())); assertEquals(settings.isPushEnabled(), update.isPushEnabled()); assertSame(settings, settings.setMaxHeaderListSize(update.getMaxHeaderListSize())); assertEquals(settings.getMaxHeaderListSize(), update.getMaxHeaderListSize()); assertSame(settings, settings.setMaxConcurrentStreams(update.getMaxConcurrentStreams()));
converted.setMaxHeaderListSize(maxHeaderListSize);
/** * Create random {@link Http2Settings} with valid values. * * @return the random settings */ public static Http2Settings randomHttp2Settings() { long headerTableSize = 10 + randomPositiveInt() % (Http2CodecUtil.MAX_HEADER_TABLE_SIZE - 10); boolean enablePush = randomBoolean(); long maxConcurrentStreams = 10 + randomPositiveLong() % (Http2CodecUtil.MAX_CONCURRENT_STREAMS - 10); int initialWindowSize = 10 + randomPositiveInt() % (Http2CodecUtil.MAX_INITIAL_WINDOW_SIZE - 10); int maxFrameSize = Http2CodecUtil.MAX_FRAME_SIZE_LOWER_BOUND + randomPositiveInt() % (Http2CodecUtil.MAX_FRAME_SIZE_UPPER_BOUND - Http2CodecUtil.MAX_FRAME_SIZE_LOWER_BOUND); long maxHeaderListSize = 10 + randomPositiveLong() % (Http2CodecUtil.MAX_HEADER_LIST_SIZE - 10); Http2Settings settings = new Http2Settings(); settings.setHeaderTableSize(headerTableSize); settings.setPushEnabled(enablePush); settings.setMaxConcurrentStreams(maxConcurrentStreams); settings.setInitialWindowSize(initialWindowSize); settings.setMaxFrameSize(maxFrameSize); settings.setMaxHeaderListSize(maxHeaderListSize); settings.set('\u0007', (randomPositiveLong() & 0xFFFFFFFFL)); return settings; }
assertSame(settings, settings.setPushEnabled(update.isPushEnabled())); assertEquals(settings.isPushEnabled(), update.isPushEnabled()); assertSame(settings, settings.setMaxHeaderListSize(update.getMaxHeaderListSize())); assertEquals(settings.getMaxHeaderListSize(), update.getMaxHeaderListSize()); assertSame(settings, settings.setMaxConcurrentStreams(update.getMaxConcurrentStreams()));