Github user gemmellr commented on a diff in the pull request:

    https://github.com/apache/qpid-proton/pull/29#discussion_r29843571
  
    --- Diff: 
proton-j/src/main/java/org/apache/qpid/proton/engine/impl/EventImpl.java ---
    @@ -157,12 +165,51 @@ public void dispatch(Handler handler)
             case TRANSPORT_CLOSED:
                 handler.onTransportClosed(this);
                 break;
    +        case REACTOR_FINAL:
    +            handler.onReactorFinal(this);
    +            break;
    +        case REACTOR_QUIESCED:
    +            handler.onReactorQuiesced(this);
    +            break;
    +        case REACTOR_INIT:
    +            handler.onReactorInit(this);
    +            break;
    +        case SELECTABLE_ERROR:
    +            handler.onSelectableError(this);
    +            break;
    +        case SELECTABLE_EXPIRED:
    +            handler.onSelectableExpired(this);
    +            break;
    +        case SELECTABLE_FINAL:
    +            handler.onSelectableFinal(this);
    +            break;
    +        case SELECTABLE_INIT:
    +            handler.onSelectableInit(this);
    +            break;
    +        case SELECTABLE_READABLE:
    +            handler.onSelectableReadable(this);
    +            break;
    +        case SELECTABLE_UPDATED:
    +            handler.onSelectableWritable(this);
    +            break;
    +        case SELECTABLE_WRITABLE:
    +            handler.onSelectableWritable(this);
    +            break;
    +        case TIMER_TASK:
    +            handler.onTimerTask(this);
    +            break;
             default:
                 handler.onUnhandled(this);
                 break;
             }
    +
    +        Iterator<Handler> children = handler.children();
    --- End diff --
    
    Commenting here to avoid spamming the semi-unrelated JIRA mentioned linked 
with the other PR that got merged.
    
    I have only skimmed this PR, since I haven't got much of experience of the 
reactor code in any of the other languages, so I'm not sure what many things 
are actually meant to do.
    
    It felt a little strange at times that some of the Connection etc objects 
now have some very reactor specific methods even though you might not be using 
the reactor with them (i.e all existing use), but I can certainly live with 
that if thats how it works elsewhere, and they presumably dont hurt anything if 
you dont use them.
    
    I did spot this 1 specific bit though, where I think it would be nice to 
optimise for what anyone using this currently will be doing. Existing handlers 
wont have any children, and that would currently mean that every time you 
dispatch an event you will create a pointless iterator, so it would be nice to 
avoid that in the case of no 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to