Construct an instance of EventHandler.
Subscribes to an event or a pattern of events.
The event name or pattern to subscribe to.
The callback function to execute when the event is dispatched.
An identifier for the subscription, used for unsubscribing.
Class EventHandler to manage event subscriptions and dispatching.