]
Antoine Sabot-Durand updated CDI-592:
-------------------------------------
Sprint: Sprint 1
Consider adding ObserverMethod.notify() method which also accepts
EventMetadata
-------------------------------------------------------------------------------
Key: CDI-592
URL:
https://issues.jboss.org/browse/CDI-592
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Events
Reporter: Martin Kouba
Fix For: 2.0 .Final
{code:java}
// Make the original method also default so that new impls don't need to implement
two methods
default void notify(T event) {
// No-op
}
// The container should always call this method...
default void notify(T event, EventMetadata metadata) {
notify(event);
}
{code}
This should not break existing implementations. The truth is a custom impl will not be
forced to implement any {{notify()}} method. But I think the benefits are worth it.