Event adapters are objects that are interposed between event sources and event listeners. Adapters implement an event listener interface and decouple one or more event sources from one or more event listeners.
Figure 9-13 illustrates the relationships between an event source, adapter, and listener. The adapter class stands in as a listener for a particular event by implementing an appropriate listener interface. When the adapter receives an event, it forwards it to the listener. The adapter may choose to act upon the event either before the event is forwarded to the listener or afterwards. Some adapters may queue events for pending delivery, for instance, whereas others may filter events that are passed on to the listener.