[ https://issues.apache.org/jira/browse/PROTON-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653424#comment-14653424 ]
ASF GitHub Bot commented on PROTON-964: --------------------------------------- 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. > 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)