responds With Stream
fun <T : Any> respondsWithStream(responseType: Class<T>, configurer: Consumer<JavaStreamingResponseDefinitionBuilder<P, T>>): StubHandle(source)
Configures a typed streaming response for this stub.
Return
A StubHandle for further inspection (e.g. StubHandle.matchCount).
Parameters
response Type
The Java Class of the streaming element type.
configurer
A Consumer that configures a JavaStreamingResponseDefinitionBuilder.
Type Parameters
T
The type of elements in the streaming response.
fun respondsWithStream(configurer: Consumer<JavaStreamingResponseDefinitionBuilder<P, String>>): StubHandle(source)
Configures a String streaming response for this stub.
Shorthand for respondsWithStream(String.class, configurer).
Return
A StubHandle for further inspection (e.g. StubHandle.matchCount).
Parameters
configurer
A Consumer that configures a JavaStreamingResponseDefinitionBuilder.