Package com.tangosol.net.events
Interface EventDispatcherAwareInterceptor<E extends Event<?>>
- Type Parameters:
E
- the type ofEvent
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
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
introduceEventDispatcher
(String sIdentifier, EventDispatcher dispatcher) Introduce and possibly bind thisEventInterceptor
to the specifiedEventDispatcher
.Methods inherited from interface com.tangosol.net.events.EventInterceptor
onEvent
-
Method Details
-
introduceEventDispatcher
Introduce and possibly bind thisEventInterceptor
to the specifiedEventDispatcher
.Note that EventInterceptors are responsible for determining whether they should be registered with an EventDispatcher by calling
EventDispatcher.addEventInterceptor(com.tangosol.net.events.EventInterceptor<E>)
.- Parameters:
sIdentifier
- the unique name identifying this interceptordispatcher
- the dispatcher being introduced
-