qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gemmellr <...@git.apache.org>
Subject [GitHub] qpid-proton pull request: PROTON-964: Proton-J extensible event ty...
Date Tue, 04 Aug 2015 10:30:48 GMT
Github user gemmellr commented on the pull request:

    https://github.com/apache/qpid-proton/pull/48#issuecomment-127559169
  
    I've commented on the code, but one final random thought:
    
    Could we use generics to enforce the correct type of handler is supplied for dispatch
and avoid some instanceof checks? (e.g  BuiltinEventTypeImpl.java)
    
    Its possibly more trouble than its worth, but it feels a little weird we dispatch to/with
only 'Handler' now when it no longer has any methods on it of use in dispatching except onUnhandled().
    Given the way all the children for a handler also get called that might not be particularly
doable, unless the children are similarly forced to be of compatible types.
    
    Of course, that whole process also suggests that onUnhandled is usually going to have
to be a no-op anyway, or some way would be needed to filter only particular events to particular
children.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message