Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-592

Consider adding ObserverMethod.notify() method which also accepts EventMetadata

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.0 .Final
    • Component/s: Events
    • Labels:
      None

      Description

      // 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);
      }
      

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mkouba Martin Kouba
                  Reporter:
                  mkouba Martin Kouba
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: