E- the specific
ApplicationEventsubclass to listen to
@FunctionalInterface public interface ApplicationListener<E extends ApplicationEvent> extends EventListener
Based on the standard
for the Observer design pattern.
As of Spring 3.0, an
ApplicationListener can generically declare
the event type that it is interested in. When registered with a Spring
ApplicationContext, events will be filtered accordingly, with the
listener getting invoked for matching event objects only.
void onApplicationEvent(E event)
event- the event to respond to