[cdi-dev] [JBoss JIRA] (CDI-633) Intoroduce BeanManager.event()

Matej Novotny (JIRA) issues at jboss.org
Tue Sep 20 08:19:00 EDT 2016


    [ https://issues.jboss.org/browse/CDI-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295640#comment-13295640 ] 

Matej Novotny commented on CDI-633:
-----------------------------------

[~tzwoenn] what you describe is what this proposal solves. {{BeanManager#fire}} cannot handle narrowing and does not allow to fire events asynchronously - and we cannot change that because of the famous backward compatibility.

Having {{BeanManager#event}} as a new method on BM will grant you acces to {{Event<Object>}} where you can narrow the type with {{select(...)}} and then {{fire()}} or {{fireAsync}}.

> Intoroduce BeanManager.event()
> ------------------------------
>
>                 Key: CDI-633
>                 URL: https://issues.jboss.org/browse/CDI-633
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Martin Kouba
>             Fix For: 2.0 (discussion)
>
>
> * this would allow to define the _specified type_ - the container may use the specified type to infer the parameterized type of the event types
> * the method should return {{javax.enterprise.event.Event<Object>}} with no qualifiers



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list