public interface EventListenerResolver
EventListenerResolver
knows how to resolve (either create or lookup) EventListener
instances
as a result of inspecting a subscriber object, mostly likely a
Subscribe
-annotated object instance.
This interface exists primarily as a support concept for the DefaultEventBus
implementation. Custom
implementations of this interface can be configured on a DefaultEventBus
instance to determine exactly
how a subscriber receives events.
For example, the AnnotationEventListenerResolver
will inspect a runtime
object for Subscribe
-annotated methods, and for each method found, return
an EventListener
instance representing the method to invoke.AnnotationEventListenerResolver
,
SingleArgumentMethodEventListener
Modifier and Type | Method and Description |
---|---|
List<EventListener> |
getEventListeners(Object instance)
Returns
EventListener instances as a result of inspecting a subscriber object, mostly likely with
Subscribe -annotated methods. |
List<EventListener> getEventListeners(Object instance)
EventListener
instances as a result of inspecting a subscriber object, mostly likely with
Subscribe
-annotated methods.instance
- the subscriber instance for which EventListener instances should be acquired.EventListener
instances as a result of inspecting a subscriber object.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.