MutableConcatServiceRegistry

class MutableConcatServiceRegistry(ascendingRegistries: List<ServiceRegistry>) : ServiceRegistry

Service registry that searches a call in multiple registries passed into its constructor. The priority is ascending, so the first non-null call returned from a registry will be used.

NOTE: No two calls should ever have the same ID. This is currently not being enforced, but will be in a later version. TODO: Enforce no two calls in registries have the same ID.

Constructors

MutableConcatServiceRegistry
Link copied to clipboard
fun MutableConcatServiceRegistry(vararg ascendingRegistries: ServiceRegistry)
MutableConcatServiceRegistry
Link copied to clipboard
fun MutableConcatServiceRegistry(ascendingRegistries: List<ServiceRegistry> = emptyList())

Functions

append
Link copied to clipboard
fun append(registry: ServiceRegistry)
getCallById
Link copied to clipboard
open override fun <T : RunnableCallDescription<*>> getCallById(id: ServiceCallIdentifier, type: KClass<T>): T?
prepend
Link copied to clipboard
fun prepend(registry: ServiceRegistry)