Package org.rribbit.creation
Interface ListenerObjectCreator
- All Known Implementing Classes:
AbstractClassBasedListenerObjectCreator
,InstantiatingClassBasedListenerObjectCreator
,ObjectBasedListenerObjectCreator
,SpringBeanClassBasedListenerObjectCreator
public interface ListenerObjectCreator
A
ListenerObjectCreator
creates the ListenerObject
s that will be used by the ListenerObjectRetriever
to search in.
Implementors are required to keep a list of ListenerObjectCreationObserver
s and notify them whenever a class is scanned and its listeners are created.- Author:
- G.J. Schouten
-
Method Summary
Modifier and TypeMethodDescriptionGetListenerObject
s from methods that have registered themselves as aListener
.void
registerObserver
(ListenerObjectCreationObserver listenerObjectCreationObserver) Adds aListenerObjectCreationObserver
to the list ofListenerObjectCreationObserver
s to be notified when a class is scanned and its listeners created.
-
Method Details
-
getListenerObjects
Collection<ListenerObject> getListenerObjects()GetListenerObject
s from methods that have registered themselves as aListener
. Implementations are responsible for keeping a local copy of thisCollection
instead of recreating it everytime this method is called.- Returns:
- a
Collection
ofListenerObject
from methods that have registered themselves as aListener
or an emptyCollection
if there are no such methods
-
registerObserver
Adds aListenerObjectCreationObserver
to the list ofListenerObjectCreationObserver
s to be notified when a class is scanned and its listeners created.- Parameters:
listenerObjectCreationObserver
-
-