@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)
{
...
}
}
ObserverMethod| Modifier and Type | Optional Element and Description |
|---|---|
TransactionPhase |
during
Transaction phase
|
Reception |
notifyObserver
Specifies whether or not call observer according to owner bean instace
|
public abstract Reception notifyObserver
public abstract TransactionPhase during
Copyright © 2021. All rights reserved.