Package com.tangosol.net.events
Interface EventDispatcher
-
- All Known Subinterfaces:
CacheLifecycleEventDispatcher
,CoherenceDispatcher
,PartitionedCacheDispatcher
,PartitionedServiceDispatcher
,SessionDispatcher
public interface EventDispatcher
- Since:
- Coherence 12.1.2
- Author:
- bo, nsa, rhan, mwj, rhl, hr 2011.03.29
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
EventDispatcher.InterceptorRegistrationEvent<E extends Event<? extends Enum>>
An InterceptorRegistrationEvent allowsEventInterceptor
s to observe other EventInterceptors being added or removed from anEventDispatcher
instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends Event<? extends Enum>>
voidaddEventInterceptor(EventInterceptor<E> interceptor)
Add anEventInterceptor
to this dispatcher to be used to processEvent
s.<E extends Event<? extends Enum>>
voidaddEventInterceptor(String sIdentifier, EventInterceptor<E> interceptor)
Add a uniquely identifiedEventInterceptor
to this dispatcher to be used to processEvent
s.<T extends Enum<T>,E extends Event<T>>
voidaddEventInterceptor(String sIdentifier, EventInterceptor<E> interceptor, Set<T> setTypes, boolean fFirst)
Add a uniquely identifiedEventInterceptor
to this dispatcher to be used to processEvent
s.Set<Enum>
getSupportedTypes()
Return the set ofEvent
types thisEventDispatcher
supports.<E extends Event<? extends Enum>>
voidremoveEventInterceptor(EventInterceptor<E> interceptor)
Remove anEventInterceptor
from this dispatcher.<E extends Event<? extends Enum>>
voidremoveEventInterceptor(String sIdentifier)
Remove anEventInterceptor
from this dispatcher.
-
-
-
Method Detail
-
addEventInterceptor
<E extends Event<? extends Enum>> void addEventInterceptor(EventInterceptor<E> interceptor)
Add anEventInterceptor
to this dispatcher to be used to processEvent
s. The EventInterceptor will be analyzed to determine applicability to this dispatcher and an identifier will be generated if not specified via an annotation. The generated identifier is the fully qualified class name.- Type Parameters:
E
- the Event the interceptor accepts- Parameters:
interceptor
- the EventInterceptor to add
-
addEventInterceptor
<E extends Event<? extends Enum>> void addEventInterceptor(String sIdentifier, EventInterceptor<E> interceptor)
Add a uniquely identifiedEventInterceptor
to this dispatcher to be used to processEvent
s. The EventInterceptor will be analyzed to determine applicability to this dispatcher.- Type Parameters:
E
- the Event the interceptor accepts- Parameters:
sIdentifier
- the unique name of theEventInterceptor
to addinterceptor
- theEventInterceptor
to add
-
addEventInterceptor
<T extends Enum<T>,E extends Event<T>> void addEventInterceptor(String sIdentifier, EventInterceptor<E> interceptor, Set<T> setTypes, boolean fFirst)
Add a uniquely identifiedEventInterceptor
to this dispatcher to be used to processEvent
s.- Type Parameters:
E
- the Event the interceptor acceptsT
- the type of events dispatched by EventEventDispatcher
- Parameters:
sIdentifier
- the unique name of theEventInterceptor
to addinterceptor
- theEventInterceptor
to addsetTypes
- theEvent
types the specified interceptor is subscribing to, or null to subscribe to all eventsfFirst
- true iff theEventInterceptor
should be added to the head of this dispatcher's interceptor chain
-
removeEventInterceptor
<E extends Event<? extends Enum>> void removeEventInterceptor(EventInterceptor<E> interceptor)
Remove anEventInterceptor
from this dispatcher.- Type Parameters:
E
- the Event the interceptor accepts- Parameters:
interceptor
- the EventInterceptor to be removed from the dispatcher based on identity reference
-
removeEventInterceptor
<E extends Event<? extends Enum>> void removeEventInterceptor(String sIdentifier)
Remove anEventInterceptor
from this dispatcher.- Parameters:
sIdentifier
- the unique name identifying the EventInterceptor to remove
-
getSupportedTypes
Set<Enum> getSupportedTypes()
Return the set ofEvent
types thisEventDispatcher
supports.- Returns:
- the set of Event types this EventDispatcher supports
-
-