ModifiableSupplier

class ModifiableSupplier<T>(delegate: RequestDataSupplier<T>) : RequestDataSupplier<T> , SimpleAfterHook

An after hook is necessary for this hook - as it's important to track if all requests have been attempted. This is due to the fact that the very last request may add more data, and thus when the delegate sends its last RequestData we must wait till that data has run through the after hooks before we know that there's no more RequestData to add to the modifiedQueue.

During this time between the last from the delegate, and the final request going through the getDataForRequest method will block the calling thread as it's unsure of its response.

Constructors

Link copied to clipboard
constructor(delegate: RequestDataSupplier<T>)

Functions

Link copied to clipboard
open override fun accept(resp: HttpResponse)
Link copied to clipboard
fun add(data: RequestData<T>): Boolean
Link copied to clipboard
open suspend override fun getDataForRequest(): RequestData<T>?
Link copied to clipboard
open fun init()