Enum Class Http2FlowControlBodies.Size

java.lang.Object
java.lang.Enum<Http2FlowControlBodies.Size>
org.mockserver.test.Http2FlowControlBodies.Size
All Implemented Interfaces:
Serializable, Comparable<Http2FlowControlBodies.Size>, Constable
Enclosing class:
Http2FlowControlBodies

public static enum Http2FlowControlBodies.Size extends Enum<Http2FlowControlBodies.Size>
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.

  • Enum Constant Details

    • SMALL

      public static final Http2FlowControlBodies.Size SMALL
      ~1 KB — fits comfortably inside a single flow-control window; use only where body size is irrelevant.
    • OVER_WINDOW

      public static final Http2FlowControlBodies.Size OVER_WINDOW
      256 KB — exceeds the 65535-byte flow-control window and is the size that makes an HTTP/2 test able to catch the channelReadComplete flush family. This is the default choice for any HTTP/2 body assertion. Do not shrink it (see enum javadoc).
    • LARGE

      public static final Http2FlowControlBodies.Size LARGE
      ~1 MB — well over the window, for tests that want a body spanning very many DATA frames.
  • Method Details

    • values

      public static Http2FlowControlBodies.Size[] 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

      public static Http2FlowControlBodies.Size valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • bytes

      public int bytes()
      The body length in bytes this size produces.