Class EventHandler<E extends com.tangosol.net.events.Event<T>,T extends Enum<T>>
java.lang.Object
com.oracle.coherence.spring.event.liveevent.handler.EventHandler<E,T>
- Type Parameters:
E
- the type ofEvent
this interceptor acceptsT
- the enumeration of event types E supports
- All Implemented Interfaces:
com.tangosol.net.events.EventDispatcherAwareInterceptor<E>
,com.tangosol.net.events.EventInterceptor<E>
- Direct Known Subclasses:
CacheEventHandler
,CoherenceLifecycleEventHandler
,LifecycleEventHandler
,ServiceEventHandler
,SessionLifecycleEventHandler
public abstract class EventHandler<E extends com.tangosol.net.events.Event<T>,T extends Enum<T>>
extends Object
implements com.tangosol.net.events.EventDispatcherAwareInterceptor<E>
Abstract base class for all observer-based interceptors.
- Since:
- 3.0
- Author:
- Gunnar Hillert
-
Field Summary
Modifier and TypeFieldDescriptionA set of event types the observer is interested in.protected final MethodEventObserver<E>
The observer method to delegate events to. -
Method Summary
Modifier and TypeMethodDescriptionCreate a final set of event types to register this interceptor for.getId()
Return a unique identifier for this interceptor.void
introduceEventDispatcher
(String identifier, com.tangosol.net.events.EventDispatcher dispatcher) void
protected String
removeScope
(String serviceName) Remove the scope prefix from a specified service name.
-
Field Details
-
observer
The observer method to delegate events to. -
eventTypes
A set of event types the observer is interested in.
-
-
Method Details
-
introduceEventDispatcher
public void introduceEventDispatcher(String identifier, com.tangosol.net.events.EventDispatcher dispatcher) -
onEvent
-
getId
Return a unique identifier for this interceptor.- Returns:
- a unique identifier for this interceptor
-
getEventTypes
Create a final set of event types to register this interceptor for.- Returns:
- a final set of event types to register this interceptor for
-
removeScope
Remove the scope prefix from a specified service name.- Parameters:
serviceName
- the service name to remove scope prefix from- Returns:
- service name with scope prefix removed
-