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 theEventMatcher
associated with the givenObserver
.Returns theObserver
associated with the givenEventMatcher
.
-
Method Details
-
getObserver
O getObserver()Returns theObserver
associated with the givenEventMatcher
.- Returns:
- The
Observer
as it is being managed by theObserverDescriptor
.
-
getEventMatcher
EM getEventMatcher()Returns theEventMatcher
associated with the givenObserver
.- Returns:
- The
EventMatcher
as it is being managed by theObserverDescriptor
.
-