Package jakarta.enterprise.inject.spi
Interface EventMetadata
public interface EventMetadata
Provides access to metadata about an observed event payload. The metadata may be for events fired with either of
Event or BeanManager.fireEvent(Object, Annotation...).
EventMetadata may only be injected into an observer method. For example:
public void afterLogin(@Observes LoggedInEvent event, EventMetadata eventMetadata) { ... }
- Since:
- 1.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet theInjectionPointrepresenting the injectedEventinstance which fired the event, ornullif it was fired fromBeanManager.fireEvent(Object, Annotation...);getType()Get the type representing runtime class of the event object with type variables resolved.
-
Method Details
-
getQualifiers
Set<Annotation> getQualifiers()- Returns:
- the qualifiers for which event payload was fired.
-
getInjectionPoint
InjectionPoint getInjectionPoint()Get theInjectionPointrepresenting the injectedEventinstance which fired the event, ornullif it was fired fromBeanManager.fireEvent(Object, Annotation...);- Returns:
- InjectionPoint of the Event
-
getType
Type getType()Get the type representing runtime class of the event object with type variables resolved.- Returns:
- the runtime type of the event object
-