Top Description Methods
javax.enterprise.inject.spi

public Interface EventMetadata

Imports
java.lang.annotation.Annotation, java.lang.reflect.Type, java.util.Set, javax.enterprise.event.Event, .Observes

Provides access to metadata about an observed event payload. The metadata may be for events fired with either of javax.enterprise.event.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) { ... }
Authors
Lincoln Baxter, III, Pete Muir, Antoine Sabot-Durand
Since
1.1
See Also
Observes

Method Summary

Modifier and TypeMethod and Description
public InjectionPoint

Returns:

InjectionPoint of the Event
getInjectionPoint
()

Get the InjectionPoint representing the injected Event instance which fired the event, or null if it was fired from BeanManager#fireEvent(Object, Annotation...);

public Set<Annotation>

Returns:

the qualifiers for which event payload was fired.
getQualifiers
()

public Type

Returns:

the runtime type of the event object
getType
()

Get the type representing runtime class of the event object with type variables resolved.

Method Detail

getInjectionPointback to summary
public InjectionPoint getInjectionPoint()

Get the InjectionPoint representing the injected Event instance which fired the event, or null if it was fired from BeanManager#fireEvent(Object, Annotation...);

Returns:InjectionPoint

InjectionPoint of the Event

getQualifiersback to summary
public Set<Annotation> getQualifiers()
Returns:Set<Annotation>

the qualifiers for which event payload was fired.

getTypeback to summary
public Type getType()

Get the type representing runtime class of the event object with type variables resolved.

Returns:Type

the runtime type of the event object