javax.enterprise.event
Interface Event<T>

Type Parameters:
T - the type of the event object

public interface Event<T>

An interface for firing events of a particular type, and registering observers for events of that type.

Author:
Gavin King, Pete Muir

Method Summary
 void fire(T event)
          Fire an event
 void fire(T event, java.lang.annotation.Annotation... bindings)
          Deprecated. 
 void observe(Observer<T> observer, java.lang.annotation.Annotation... bindings)
          Deprecated. 
<U extends T>
Event<U>
select(java.lang.annotation.Annotation... bindings)
           
<U extends T>
Event<U>
select(java.lang.Class<U> subtype, java.lang.annotation.Annotation... bindings)
           
<U extends T>
Event<U>
select(TypeLiteral<U> subtype, java.lang.annotation.Annotation... bindings)
           
 

Method Detail

fire

@Deprecated
void fire(T event,
                     java.lang.annotation.Annotation... bindings)
Deprecated. 

Fire an event

Parameters:
event - the event type
bindings - the event bindings

fire

void fire(T event)
Fire an event

Parameters:
event - the event type

select

<U extends T> Event<U> select(java.lang.annotation.Annotation... bindings)

select

<U extends T> Event<U> select(java.lang.Class<U> subtype,
                              java.lang.annotation.Annotation... bindings)

select

<U extends T> Event<U> select(TypeLiteral<U> subtype,
                              java.lang.annotation.Annotation... bindings)

observe

@Deprecated
void observe(Observer<T> observer,
                        java.lang.annotation.Annotation... bindings)
Deprecated. 

Register an observer for a specific type

Parameters:
observer - the observer to register
bindings - the bindings to observe the event for


Copyright © 2008-2009. All Rights Reserved.