An event model is composed of the event source, the event itself, and the event listener: the event source, or provider, is the sender of the events; the event is the object that is sent; and the event listener, or event sink, is the receiver of the events.

An event model is a set of classes and interfaces that determine how these components relate to each other.

On the event source side, an event model determines how components may...

  • create and describe events,
  • trigger, or fire, events, or
  • distribute events to interested components.

On the listener side, an event model determines how components may...

  • subscribe to event sources,
  • react to events when received, or
  • remove the subscription to event sources when desired. 

相关文章: