T - the observed event type of the synthetic observerpublic interface SyntheticObserver<T>
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.| Modifier and Type | Method and Description |
|---|---|
void |
observe(EventContext<T> event,
Parameters params)
Consumes an event.
|
void observe(EventContext<T> event, Parameters params) throws java.lang.Exception
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.
event - the event context, never nullparams - the parameter map, never nulljava.lang.Exception - checked exception will be wrapped and rethrown as an ObserverException