Enum Class StreamingFormat

java.lang.Object
java.lang.Enum<StreamingFormat>
org.mockserver.llm.StreamingFormat
All Implemented Interfaces:
Serializable, Comparable<StreamingFormat>, Constable

public enum StreamingFormat extends Enum<StreamingFormat>
The wire format used by a provider for streaming responses.
  • SSE — Server-Sent Events (text/event-stream): each chunk is emitted as data: <payload>\n\n with optional event:, id:, and retry: fields.
  • NDJSON — Newline-Delimited JSON (application/x-ndjson): each chunk is a single JSON object followed by a newline character (<json>\n). Used by Ollama.
  • AWS_EVENT_STREAM — AWS event-stream binary framing (application/vnd.amazon.eventstream): each chunk is a binary message with prelude CRC32, typed headers, a base64-wrapped JSON payload, and a trailing message CRC32. Used by Bedrock InvokeModelWithResponseStream.
  • Enum Constant Details

  • Method Details

    • values

      public static StreamingFormat[] 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 StreamingFormat 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