Package com.oracle.coherence.cdi
Class CdiEventObserver<E extends Event>
java.lang.Object
com.oracle.coherence.cdi.CdiEventObserver<E>
- All Implemented Interfaces:
EventObserverSupport.EventObserver<E>
public class CdiEventObserver<E extends Event>
extends Object
implements EventObserverSupport.EventObserver<E>
An observer of events that wraps a CDI
ProcessObserverMethod
.- Since:
- 20.12
- Author:
- Jonathan Knight 2020.11.07
-
Constructor Summary
ConstructorDescriptionCdiEventObserver
(jakarta.enterprise.inject.spi.ObserverMethod<E> method) Create aCdiEventObserver
from anObserverMethod
CdiEventObserver
(jakarta.enterprise.inject.spi.ProcessObserverMethod<E, ?> event) Create aCdiEventObserver
from an observed method event. -
Method Summary
-
Constructor Details
-
CdiEventObserver
Create aCdiEventObserver
from an observed method event.- Parameters:
event
- the observed method event
-
CdiEventObserver
Create aCdiEventObserver
from anObserverMethod
- Parameters:
method
- theObserverMethod
-
-
Method Details
-
getId
Description copied from interface:EventObserverSupport.EventObserver
Return the unique identifier for this observer.This value will be used as the identifier when registering an
EventInterceptor
.- Specified by:
getId
in interfaceEventObserverSupport.EventObserver<E extends Event>
- Returns:
- the unique identifier for this observer
-
notify
Description copied from interface:EventObserverSupport.EventObserver
Process an event.- Specified by:
notify
in interfaceEventObserverSupport.EventObserver<E extends Event>
- Parameters:
event
- the event
-
isAsync
public boolean isAsync()Description copied from interface:EventObserverSupport.EventObserver
Returntrue
if this observer should be async.- Specified by:
isAsync
in interfaceEventObserverSupport.EventObserver<E extends Event>
- Returns:
true
if this observer should be async
-
getObservedQualifiers
Description copied from interface:EventObserverSupport.EventObserver
Return the qualifiers for the observer that wil be used to further qualify which events are received.- Specified by:
getObservedQualifiers
in interfaceEventObserverSupport.EventObserver<E extends Event>
- Returns:
- the qualifiers for the observer
-