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>
ThisObserverDescriptor
describes theObserver
, i.e. in some cases anObserver
requires anEventMatcher
which determines whichGenericActionEvent
instances to pass to theObserver
. TheObserverDescriptor
is itself anObserver
calling theEventMatcher
to determine whether to delegate theGenericActionEvent
to containedObserver
or not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EM
getEventMatcher()
Returns theEventMatcher
associated with the givenObserver
.O
getObserver()
Returns theObserver
associated with the givenEventMatcher
.
-
-
-
Method Detail
-
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
.
-
-