Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,  
 * See the License for the specific language governing permissions and
 * limitations under the License.
package javax.enterprise.inject.spi;

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(java.lang.Object,java.lang.annotation.Annotation[]).

EventMetadata may only be injected into an observer method. For example:

 public void afterLogin(@Observes LoggedInEvent event, EventMetadata eventMetadata) { ... }

Lincoln Baxter, III
Pete Muir
See also:
public interface EventMetadata {
Get the qualifiers for which event payload was fired.
    public Set<AnnotationgetQualifiers();

Get the InjectionPoint representing the injected javax.enterprise.event.Event instance which fired the event, or null if it was fired from BeanManager.fireEvent(java.lang.Object,java.lang.annotation.Annotation[]);
    public InjectionPoint getInjectionPoint();

Get the type representing runtime class of the event object with type variables resolved.
    public Type getType();
New to GrepCode? Check out our FAQ X