onEvent
OnEvent is a commonly used naming convention in event-driven programming for a method that handles a particular event. The exact meaning and signature of onEvent vary by framework, but the core idea is a callback that is invoked by an event dispatcher when the corresponding event occurs.
In many frameworks, an object subscribes to events by registering with an event source or event bus,
Common use cases include user interface events (button presses, mouse movements), I/O and network events, and
Design considerations: the method name onEvent is not universal; the actual signature depends on the framework.
See also: event-driven programming, event bus, observer pattern.