[ 
https://issues.apache.org/jira/browse/PROTON-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653680#comment-14653680
 ] 

ASF GitHub Bot commented on PROTON-964:
---------------------------------------

Github user gemmellr commented on the pull request:

    https://github.com/apache/qpid-proton/pull/48#issuecomment-127622789
  
    > I'm not sure how this would work, because it's easy (and I think 
necessary) to mix and create a tangle > of handlers of different descent in a 
tree (or even DAG) of handlers with Handler#add(Handler).
    >
    > So an Event instance will get dispatched to many handlers, and 
necessarily only some will be of an assignable type. I'm not sure how to 
express that with generics.
    
    Yeah, the rest of my reply was getting at that. It just seemed a little 
icky that everyone who implements a handler should need the instanceof check 
and call unhandled othewise. Not saying I have an answer :)
    
    > The core can afford the luxury of declaring 'everybody extend me' but 
that is not viable for a library that sits on top of proton.
    
    Not sure I understood this bit. If I was writing a library on top of Proton 
I'd possibly want to declare my own 'everybody extend me' point if things 
outwith that library were expected to extend it (to try and insulate somewhat 
from changes like this in Proton).


> Proton-J extensible event types
> -------------------------------
>
>                 Key: PROTON-964
>                 URL: https://issues.apache.org/jira/browse/PROTON-964
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-j
>    Affects Versions: 0.10
>            Reporter: Bozo Dragojevic
>            Assignee: Bozo Dragojevic
>             Fix For: 0.11
>
>
> Event.Type is an enum which makes it impossible to extend.
> Introduce a separate interface EventType and make Event.Type implement it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to