Module org.refcodes.observer
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>
This
ObserverDescriptor describes the Observer, i.e. in some
cases an Observer requires an EventMatcher which determines
which GenericActionEvent instances to pass to the Observer.
The ObserverDescriptor is itself an Observer calling the
EventMatcher to determine whether to delegate the
GenericActionEvent to contained Observer or not.-
Method Summary
Modifier and TypeMethodDescriptionReturns theEventMatcherassociated with the givenObserver.Returns theObserverassociated with the givenEventMatcher.
-
Method Details
-
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.
-