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