Top Description Methods
jakarta.enterprise.inject.build.compatible.spi

public Interface SyntheticObserver<T>

Type Parameters
<T>
the observed event type of the synthetic observer
Imports
jakarta.enterprise.event.ObserverException, jakarta.enterprise.inject.spi.EventContext

The event notification function for a synthetic observer defined by SyntheticObserverBuilder. CDI container will create an instance of the event notification function every time when it needs to notify the synthetic observer. Implementations must be public classes with a public zero-parameter constructor; they must not be beans.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
observe(EventContext<T>
the event context, never null
event
,
Parameters
the parameter map, never null
params
)

Consumes an event.

Method Detail

observeback to summary
public void observe(EventContext<T> event, Parameters params) throws Exception

Consumes an event. The EventContext provides access to the event payload, as well as the EventMetadata.

The parameter map contains the same values that were passed to the SyntheticObserverBuilder that defined the synthetic observer.

Parameters
event:EventContext<T>

the event context, never null

params:Parameters

the parameter map, never null

Exceptions
Exception:
checked exception will be wrapped and rethrown as an ObserverException