@ApplicationScoped |
@SomeInterceptorBinding // -> observer method is intercepted |
public class Foo { |
|
@Inject |
Event<Payload> event; |
|
private void foo(@Observes Payload payload) { |
// do something |
} |
|
// foo() notified within invocation of fireEvent() |
public void fireEvent() { |
event.fire(new Payload()); |
} |
}
|