javax.enterprise.event
Annotation Type Observes


@Target(value=PARAMETER)
@Retention(value=RUNTIME)
@Documented
public @interface Observes

Specifies that a method is an observer method and which event should be observed.

Sample:
 public class UserHandler 
 {
   public void afterUserLogin(@Observes UserLoginEvent userHasLoggedIn) 
   {
     ...
   }
 }
 

Version:
$Rev: 826101 $ $Date: 2009-10-16 23:44:48 +0200 (Fri, 16 Oct 2009) $
See Also:
ObserverMethod

Optional Element Summary
 TransactionPhase during
          Transaction phase
 Reception notifyObserver
          Specifies whether or not call observer according to owner bean instace
 

notifyObserver

public abstract Reception notifyObserver
Specifies whether or not call observer according to owner bean instace

Default:
javax.enterprise.event.Reception.ALWAYS

during

public abstract TransactionPhase during
Transaction phase

Default:
javax.enterprise.event.TransactionPhase.IN_PROGRESS


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.