@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface Observes
public void listen(@Observes SomeEvent event) {
// do something..
}
In case more observers observe the same event, they are ordered as they appear on classpath.
If you need to reorder them, you can use precedence
value. The higher the precedence
is,
the sooner the observer is executed.Modifier and Type | Optional Element and Description |
---|---|
int |
precedence |
Copyright © 2016 JBoss by Red Hat. All rights reserved.