Java Streaming Response Definition Builder
Java-friendly wrapper around StreamingResponseDefinitionBuilder that returns this from every mutating method, enabling fluent chaining without Kotlin-specific idioms.
Java callers receive this type from JavaBuildingStep.respondsWithStream and use it to configure the streaming HTTP response for a stub:
mokksy.get(spec -> spec.path("/stream"))
.respondsWithStream(builder -> builder
.chunks(List.of("Hello", " ", "World"))
.delayBetweenChunksMillis(50));Content copied to clipboard
Alternatively, supply chunks as a Stream:
mokksy.get(spec -> spec.path("/events"))
.respondsWithStream(builder -> builder
.chunks(Stream.of("data1", "data2")));Content copied to clipboard
Type Parameters
P
The type of the request payload.
T
The type of each streamed chunk.