Mediator class

Constructors

Mediator()

Properties

hashCode int
The hash code for this object.
no setterinherited
length int
get lenth of registered handlers
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearHandlers() → void
clear all handlers
getHandler<T extends IBaseHandler>() Iterable<InstanceFactory<T>>
get the registered handlers of T
getHandlersFor<TResult, Command extends IBaseCommand<TResult>>(Command command) Iterable<_InstanceFactoryChecker<TResult, Command>>
get the registered handlers for Command
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerHandler<TResult, Command extends IBaseCommand<TResult>, Handler extends _ICommandHandler<TResult, Command>>(InstanceFactory<Handler> handler) → void
Register a function that return a handler of type ICommandHandler for Command of type IBaseCommand
removeHandler<T extends IBaseHandler>(InstanceFactory<T> handler) → void
remove spacified handler
removeHandlers<T extends IBaseHandler>() → void
remove all handlers of T
run<TResult, Command extends IBaseCommand<TResult>>(Command command) → TResult
call the first instance of ICommandHandler that registered for command
runAll<TResult, Command extends IBaseCommand<TResult>>(Command command) List<TResult>
call all instances of ICommandHandler that registered for command
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance Mediator
no setter