MessageFunctionRegistrar
Registry for message functions that can be registered and queried.
This interface provides a centralized mechanism for managing message functions within the Wow framework. It allows registration and unregistration of functions, as well as querying for functions that can process specific messages. The registry supports filtering to create scoped registrars for specific use cases.
Example usage:
val registrar = MessageFunctionRegistrar<MyMessageFunction>()
val myFunction = MyMessageFunction()
registrar.register(myFunction)
val message = MyMessage()
val supported = registrar.supportedFunctions(message)
supported.forEach { it.process(message) }Content copied to clipboard
Parameters
F
The type of message function being registered, constrained to implement MessageFunction<*, *, *>
See also
for the base interface of message functions
Inheritors
Properties
Functions
Link copied to clipboard
abstract fun <M : Message<*, Any>, NamedBoundedContext, NamedAggregate> supportedFunctions(message: M): Sequence<F>
Finds all registered functions that support processing the given message.
Link copied to clipboard
Unregisters a message function from this registrar.