Output

data class Output<H : Headers, B : Body<*>>(val statusMatcher: StatusMatcher, val headers: H, val body: B)(source)

Associates a StatusMatcher with an output Body definition and optional response headers.

Constructors

Link copied to clipboard
constructor(statusMatcher: StatusMatcher, headers: H, body: B)

Properties

Link copied to clipboard
val body: B

Body definition emitted when statusMatcher is satisfied.

Link copied to clipboard
val headers: H

Headers emitted when statusMatcher is satisfied.

Link copied to clipboard

Status matching logic that selects this output definition.

Functions

Link copied to clipboard

Returns an empty map when the output does not emit headers.

Encodes output headers for an output definition producing one header.

fun <B : Body<*>, H1 : Any, H2 : Any> Output<Headers2<H1, H2>, B>.encodeHeaders(h1: H1, h2: H2): Map<String, List<String>>

Encodes output headers for an output definition producing two headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any> Output<Headers3<H1, H2, H3>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3): Map<String, List<String>>

Encodes output headers for an output definition producing three headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any> Output<Headers4<H1, H2, H3, H4>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4): Map<String, List<String>>

Encodes output headers for an output definition producing four headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any> Output<Headers5<H1, H2, H3, H4, H5>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5): Map<String, List<String>>

Encodes output headers for an output definition producing five headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any, H6 : Any> Output<Headers6<H1, H2, H3, H4, H5, H6>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5, h6: H6): Map<String, List<String>>

Encodes output headers for an output definition producing six headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any, H6 : Any, H7 : Any> Output<Headers7<H1, H2, H3, H4, H5, H6, H7>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5, h6: H6, h7: H7): Map<String, List<String>>

Encodes output headers for an output definition producing seven headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any, H6 : Any, H7 : Any, H8 : Any> Output<Headers8<H1, H2, H3, H4, H5, H6, H7, H8>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5, h6: H6, h7: H7, h8: H8): Map<String, List<String>>

Encodes output headers for an output definition producing eight headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any, H6 : Any, H7 : Any, H8 : Any, H9 : Any> Output<Headers9<H1, H2, H3, H4, H5, H6, H7, H8, H9>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5, h6: H6, h7: H7, h8: H8, h9: H9): Map<String, List<String>>

Encodes output headers for an output definition producing nine headers.

fun <B : Body<*>, H1 : Any, H2 : Any, H3 : Any, H4 : Any, H5 : Any, H6 : Any, H7 : Any, H8 : Any, H9 : Any, H10 : Any> Output<Headers10<H1, H2, H3, H4, H5, H6, H7, H8, H9, H10>, B>.encodeHeaders(h1: H1, h2: H2, h3: H3, h4: H4, h5: H5, h6: H6, h7: H7, h8: H8, h9: H9, h10: H10): Map<String, List<String>>

Encodes output headers for an output definition producing ten headers.