api

http4k / org.http4k.traffic / Sink

Sink

interface Sink

Functions

Name Summary
set abstract operator fun set(request: Request, response: Response): Unit

Companion Object Functions

Name Summary
DiskStream Serialises HTTP traffic to the FS in order.fun DiskStream(baseDir: String = ".", shouldStore: (HttpMessage) -> Boolean = { true }, id: () -> String = { System.nanoTime().toString() + UUID.randomUUID().toString() }): <ERROR CLASS>
DiskTree Serialises HTTP traffic to the FS, optimised for retrieval.fun DiskTree(baseDir: String = ".", shouldStore: (HttpMessage) -> Boolean = { true }): <ERROR CLASS>
MemoryMap Serialises HTTP traffic in Memory, optimised for retrieval.fun MemoryMap(cache: MutableMap<Request, Response>, shouldStore: (HttpMessage) -> Boolean = { true }): <ERROR CLASS>
MemoryStream Serialises HTTP traffic to Memory in order.fun MemoryStream(stream: MutableList<Pair<Request, Response>>, shouldStore: (HttpMessage) -> Boolean = { true }): <ERROR CLASS>

Companion Object Extension Functions

Name Summary
Servirtium Write HTTP traffic to disk in Servirtium markdown format.fun Sink.Companion.Servirtium(target: Consumer<ByteArray>, options: InteractionOptions): Sink

Inheritors

Name Summary
ReadWriteCache Combined Read/Write storage models, optimised for retrieval.interface ReadWriteCache : Sink, Source
ReadWriteStream Combined Read/Write storage models, optimised for replay.interface ReadWriteStream : Sink, Replay