Subscribes a handler to a specific event type.
Multiple handlers can subscribe to the same event type.
The type of event
The event class or identifier
The handler for this event type
Publishes a single event to all subscribed handlers.
Handlers are executed in parallel.
The event to publish
Publishes multiple events to all subscribed handlers.
Events are published in order, but handlers within each event are executed in parallel.
The events to publish
Unsubscribes a handler from a specific event type.
The type of event
The event class or identifier
The handler to unsubscribe
Bus for publishing events to their handlers.
Supports multiple handlers for the same event type (pub/sub pattern).
Example