Package org.refcodes.observer
Interface ObserverDescriptor<E extends GenericEvent<?>,O extends Observer<E>,EM extends EventMatcher<E>>
-
- Type Parameters:
E- the element typeO- the generic typeEM- the generic type
- All Superinterfaces:
Observer<E>
- All Known Implementing Classes:
ObserverDescriptorImpl
public interface ObserverDescriptor<E extends GenericEvent<?>,O extends Observer<E>,EM extends EventMatcher<E>> extends Observer<E>
ThisObserverDescriptordescribes theObserver, i.e. in some cases anObserverrequires anEventMatcherwhich determines whichGenericActionEventinstances to pass to theObserver. TheObserverDescriptoris itself anObservercalling theEventMatcherto determine whether to delegate theGenericActionEventto containedObserveror not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EMgetEventMatcher()Returns theEventMatcherassociated with the givenObserver.OgetObserver()Returns theObserverassociated with the givenEventMatcher.
-
-
-
Method Detail
-
getObserver
O getObserver()
Returns theObserverassociated with the givenEventMatcher.- Returns:
- The
Observeras it is being managed by theObserverDescriptor.
-
getEventMatcher
EM getEventMatcher()
Returns theEventMatcherassociated with the givenObserver.- Returns:
- The
EventMatcheras it is being managed by theObserverDescriptor.
-
-