MiddlewareManager

An abstract class for managing multiple middleware instances.

This class extends CoroutineMiddleware and ensures that all registered middleware switchers are attached and detached appropriately based on the lifecycle of the manager.

Parameters

C

The type of MiddlewareContext that the middleware operates on.

T

The type of Middleware that this manager handles.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Returns current state of middleware, true if already attached, false otherwise

Functions

Link copied to clipboard
fun detach()

Function called to detach middleware context if it exists

Link copied to clipboard
open override fun onAttached(middlewareContext: C)

Called when the middleware manager is attached.

Link copied to clipboard
open override fun onDetached(middlewareContext: C)

Called when the middleware manager is detached.