mediator library

Classes

BaseEventSubscriptionBuilder<TInput, TOutput>
Base for implementing custom EventSubscriptionBuilder.
Command
A command Request that doesn't return any data.
CommandHandler<TCommand extends Command>
Command handler for TCommand.
DispatchStrategy
Strategy to use for dispatching events to the handlers
DomainEvent
Represents a domain event
EventHandler<TEvent>
Handler for TEvent.
EventHandlerStore
EventManager
Publish events through the mediator to be handled by multiple handlers.
EventObserver
Observer for DomainEvent's.
EventSubscription
Can be used to cancel the given subscription of a EventHandler.
EventSubscriptionBuilder<T>
Builder that is able to subscribe to the Mediator.
Mediator
The Mediator is the central point of communication.
PipelineBehavior<TResponse, TRequest>
Pipeline behavior to surround the inner handler. Implementations add additional behavior and await the next delegate.
PipelineBehaviorStore
PipelineConfigurator
Query<TResponse extends Object>
A query Request that will return TResponse.
QueryHandler<TResponse extends Object, TQuery extends Query<TResponse>>
Query handler for TQuery.
Request<TResponse extends Object?>
Base request that can be used to send requests to their handlers.
RequestHandlerStore
RequestManager
Send requests through the mediator to be handled by a single handler.

Typedefs

EventHandlerFactory<TEvent> = EventHandler<TEvent> Function()
Factory to create a EventHandler.
PipelineBehaviorFactory<TResponse, TRequest> = PipelineBehavior<TResponse, TRequest> Function()
Factory to create a PipelineBehavior.
PipelineHandler<TResponse, TRequest> = FutureOr<TResponse> Function(TRequest, RequestHandlerDelegate<TResponse> )
RequestHandlerDelegate<TResponse> = FutureOr<TResponse> Function()
Represents the continuation for the next task to execute in the pipeline.
RequestHandlerFactory<TResponse, TRequest extends Request<TResponse>> = RequestHandler<TResponse, TRequest> Function()
Factory to create a RequestHandler.