01: /*
02: * Created on 15-Jan-2006
03: */
04: package uk.org.ponder.iocevent;
05:
06: /** ListenerReporter is part of a general solution to the "listener adder" problem
07: * raised by IOC containers. Given they expect beans to load in an order induced
08: * by a DAG, AND in addition would prefer not to be aware specifically of the
09: * number and nature of their targets, it is generally hazardous to specify
10: * these as direct bean dependencies.
11: * <p>Instead, each bean specifies a single, central "wiring" bean as their
12: * dependency, the "beetlecrusher", which implements ListenerGetter on one
13: * side, and ListenerReporter on the other.
14: * <p>It is key for the operation of this solution that no events are fired
15: * before the bean container is fully constructed!
16: * @author Antranig Basman (amb26@ponder.org.uk)
17: *
18: */
19:
20: public interface ListenerReporter {
21: /** Report the supplied listener object as listening to a certain class
22: * of event.
23: * @param listener The listener to be reported.
24: * @param listenerkey A key identifying this class of listener - the target
25: * ListenerGetter will supply a matching key on requesting the listener list.
26: * @param targetkey A key identifying the required type of target - the
27: * target ListenerGetter will supply a matching key on requesting the listener
28: * list.
29: */
30: public void reportListener(Object listener, Object listenerkey,
31: Object targetkey);
32: }
|