Package org.mockserver.test
Enum Class Http2FlowControlBodies.Size
- All Implemented Interfaces:
Serializable,Comparable<Http2FlowControlBodies.Size>,Constable
- Enclosing class:
- Http2FlowControlBodies
Named body sizes for HTTP/2 tests.
OVER_WINDOW is the load-bearing one: it is the reason this class exists and the only
size that exercises the WINDOW_UPDATE-driven flush. It is fixed at 256 KB — comfortably
over the 65535-byte window, spanning the per-stream window, the
connection window and many DATA frames.
DO NOT shrink OVER_WINDOW to at or below 65535.
Doing so silently restores the blind spot that hid #2641/#2667/#2669/#2683 for four releases and
makes every test built on it incapable of catching the regression it exists to lock. The static
initialiser below fails the build if that invariant is ever broken, so an accidental shrink
cannot compile-and-pass — it errors loudly at class load.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription~1 MB — well over the window, for tests that want a body spanning very many DATA frames.256 KB — exceeds the 65535-byte flow-control window and is the size that makes an HTTP/2 test able to catch thechannelReadCompleteflush family.~1 KB — fits comfortably inside a single flow-control window; use only where body size is irrelevant. -
Method Summary
Modifier and TypeMethodDescriptionintbytes()The body length in bytes this size produces.static Http2FlowControlBodies.SizeReturns the enum constant of this class with the specified name.static Http2FlowControlBodies.Size[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SMALL
~1 KB — fits comfortably inside a single flow-control window; use only where body size is irrelevant. -
OVER_WINDOW
256 KB — exceeds the 65535-byte flow-control window and is the size that makes an HTTP/2 test able to catch thechannelReadCompleteflush family. This is the default choice for any HTTP/2 body assertion. Do not shrink it (see enum javadoc). -
LARGE
~1 MB — well over the window, for tests that want a body spanning very many DATA frames.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
bytes
public int bytes()The body length in bytes this size produces.
-