Package com.oracle.coherence.cdi
Class CdiMapEventObserver<K,V>
- java.lang.Object
-
- com.oracle.coherence.cdi.CdiMapEventObserver<K,V>
-
- All Implemented Interfaces:
AnnotatedMapListener.MapEventObserver<K,V>
public class CdiMapEventObserver<K,V> extends Object implements AnnotatedMapListener.MapEventObserver<K,V>
An implementation of aAnnotatedMapListener.MapEventObserver
that wraps a CDIObserverMethod
that observesMapEvent
.- Author:
- Jonathan Knight 2020.11.20
-
-
Constructor Summary
Constructors Constructor Description CdiMapEventObserver(javax.enterprise.inject.spi.ObserverMethod<MapEvent<K,V>> method)
Create aCdiMapEventObserver
from anObserverMethod
CdiMapEventObserver(javax.enterprise.inject.spi.ProcessObserverMethod<MapEvent<K,V>,?> event)
Create aCdiMapEventObserver
from an observed method event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Annotation>
getObservedQualifiers()
Return the qualifiers for the observer that wil be used to further qualify which events are received.boolean
isAsync()
Returntrue
if this observer should be async.void
notify(MapEvent<K,V> event)
Process an event.String
toString()
-
-
-
Constructor Detail
-
CdiMapEventObserver
public CdiMapEventObserver(javax.enterprise.inject.spi.ProcessObserverMethod<MapEvent<K,V>,?> event)
Create aCdiMapEventObserver
from an observed method event.- Parameters:
event
- the observed method event
-
CdiMapEventObserver
public CdiMapEventObserver(javax.enterprise.inject.spi.ObserverMethod<MapEvent<K,V>> method)
Create aCdiMapEventObserver
from anObserverMethod
- Parameters:
method
- theObserverMethod
-
-
Method Detail
-
notify
public void notify(MapEvent<K,V> event)
Description copied from interface:AnnotatedMapListener.MapEventObserver
Process an event.- Specified by:
notify
in interfaceAnnotatedMapListener.MapEventObserver<K,V>
- Parameters:
event
- the event
-
isAsync
public boolean isAsync()
Description copied from interface:AnnotatedMapListener.MapEventObserver
Returntrue
if this observer should be async.- Specified by:
isAsync
in interfaceAnnotatedMapListener.MapEventObserver<K,V>
- Returns:
true
if this observer should be async
-
getObservedQualifiers
public Set<Annotation> getObservedQualifiers()
Description copied from interface:AnnotatedMapListener.MapEventObserver
Return the qualifiers for the observer that wil be used to further qualify which events are received.- Specified by:
getObservedQualifiers
in interfaceAnnotatedMapListener.MapEventObserver<K,V>
- Returns:
- the qualifiers for the observer
-
-