AfterHandler

data class AfterHandler<T : Any>(val afterPredicate: (Context<T>) -> Boolean = { true }, val callback: (Context<T>) -> Context<T>) : Handler<T>

After handlers are executed even if a filter don't call next handler (if after was added before filter).

After handlers' filters are always true because they are meant to be evaluated on the return. If they are not called in first place, they won't be executed on the return of the next handler. Their filter is evaluated after the next call, not before.

Constructors

Link copied to clipboard
constructor(afterPredicate: (Context<T>) -> Boolean = { true }, callback: (Context<T>) -> Context<T>)

Properties

Link copied to clipboard
val afterPredicate: (Context<T>) -> Boolean
Link copied to clipboard
open override val callback: (Context<T>) -> Context<T>
Link copied to clipboard
open override val predicate: (Context<T>) -> Boolean

Functions

Link copied to clipboard
open override fun process(context: Context<T>): Context<T>