Interface EventDispatcherAwareInterceptor<E extends Event<?>>

Type Parameters:
E - the type of Event this interceptor accepts
All Superinterfaces:
EventInterceptor<E>
All Known Subinterfaces:
Coherence.LifecycleListener
All Known Implementing Classes:
CoherenceConfigSource, EventObserverSupport.CacheLifecycleEventHandler, EventObserverSupport.CoherenceLifecycleEventHandler, EventObserverSupport.EntryEventHandler, EventObserverSupport.EntryProcessorEventHandler, EventObserverSupport.EventHandler, EventObserverSupport.LifecycleEventHandler, EventObserverSupport.ServiceEventHandler, EventObserverSupport.SessionLifecycleEventHandler, EventObserverSupport.TransactionEventHandler, EventObserverSupport.TransferEventHandler, EventObserverSupport.UnsolicitedCommitEventHandler, NamedEventInterceptor

public interface EventDispatcherAwareInterceptor<E extends Event<?>> extends EventInterceptor<E>
EventDispatcherAwareInterceptor is an EventInterceptor implementation that takes responsibility for registering itself with the EventDispatcher. This allows the EventInterceptor to determine applicability to the dispatcher in addition to choosing the appropriate registration call exposed by the EventDispatcher. The following shows an example of a introduceEventDispatcher implementation that explicitly states its interest in being the first interceptor called and to be notified on EntryEvent.Type.INSERTING events exclusively:

     public void introduceEventDispatcher(String sIdentifier, EventDispatcher dispatcher)
         {
         dispatcher.addEventInterceptor(sIdentifier, this,
             new HashSet(Arrays.asList(EntryEvent.Type.INSERTING)), true);
         }
 
This interface accommodates for those EventInterceptor implementations that require a custom registration mechanism outside of the provided mechanisms; annotation and/or generics.
Since:
Coherence 12.1.2
Author:
hr 2012.09.19
See Also: