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 CDIProcessObserverMethod
.- Since:
- 20.12
- Author:
- Jonathan Knight 2020.11.07
-
-
Constructor Summary
Constructors Constructor Description CdiEventObserver(javax.enterprise.inject.spi.ObserverMethod<E> method)
Create aCdiEventObserver
from anObserverMethod
CdiEventObserver(javax.enterprise.inject.spi.ProcessObserverMethod<E,?> event)
Create aCdiEventObserver
from an observed method event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Return the unique identifier for this observer.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(E event)
Process an event.
-
-
-
Constructor Detail
-
CdiEventObserver
public CdiEventObserver(javax.enterprise.inject.spi.ProcessObserverMethod<E,?> event)
Create aCdiEventObserver
from an observed method event.- Parameters:
event
- the observed method event
-
CdiEventObserver
public CdiEventObserver(javax.enterprise.inject.spi.ObserverMethod<E> method)
Create aCdiEventObserver
from anObserverMethod
- Parameters:
method
- theObserverMethod
-
-
Method Detail
-
getId
public String 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
public void notify(E event)
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
public Set<Annotation> 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
-
-