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
Fields Modifier and Type Field Description protected EnumSet<T>
eventTypes
A set of event types the observer is interested in.protected MethodEventObserver<E>
observer
The observer method to delegate events to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EnumSet<T>
getEventTypes()
Create a final set of event types to register this interceptor for.String
getId()
Return a unique identifier for this interceptor.void
introduceEventDispatcher(String identifier, com.tangosol.net.events.EventDispatcher dispatcher)
void
onEvent(E event)
protected String
removeScope(String serviceName)
Remove the scope prefix from a specified service name.
-
-
-
Method Detail
-
introduceEventDispatcher
public void introduceEventDispatcher(String identifier, com.tangosol.net.events.EventDispatcher dispatcher)
-
onEvent
public void onEvent(E event)
-
getId
public String getId()
Return a unique identifier for this interceptor.- Returns:
- a unique identifier for this interceptor
-
getEventTypes
protected EnumSet<T> 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
-
-