SIGN IN SIGN UP

[Contracts][EventDispatcher] Add ListenerIntrospectionInterface

Reading which listeners are registered is not the same capability as
registering one, and a dispatcher that forwards to a bus it does not own can
honestly offer the second without the first. The three getters therefore become
an interface of their own rather than growing the dispatcher contract, and
EventDispatcherInterface extends it, so every dispatcher of the component
satisfies it without a line of code.

ScopedEventDispatcher can then say what it needs. Typing the contracts
interface, as the deprecation of the autowiring alias asks, and wrapping the
dispatcher in a scope, as the deprecation of mutating the one of the container
asks, could not be done together until now: wrapping reads the listeners of what
it wraps.

The new interface is autowirable, so a service that reads the listeners of the
application, a debug tool for instance, asks for the capability instead of the
dispatcher. Eight classes take the narrower type as a result, the two Messenger
commands as an intersection since they also dispatch.
N
Nicolas Grekas committed
e6acb82ffb1c92b6f187b98e286a1b73b78b6503
Parent: 3c13c53