no instanceOf, no reflection during invoke only get all interfaces from class when register a listener instance
2018-05-14 10:43 GMT+08:00 Willem Jiang <[email protected]>: > We need to limited the events types, otherwise it could cause some trouble > if the listener interesting bunch of events. > BTW, can we set the event class type to the Listener? > I'm not sure how much efforts the instanceOf operation need. > If it is as heavy as the reflection, we may be back to the start point. > > > Willem Jiang > > Blog: http://willemjiang.blogspot.com (English) > http://jnn.iteye.com (Chinese) > Twitter: willemjiang > Weibo: 姜宁willem > > On Mon, May 14, 2018 at 9:25 AM, wjm wjm <[email protected]> wrote: > > > class XxxListener implements AListener,BListener...{ > > } > > > > All listener interfaces extends from a center type > > when we got a listener instance, then loop all it's interfaces and cache > > them > > when publish event, get listener instance from cache and invoke > > > > 2018-05-13 10:07 GMT+08:00 Willem Jiang <[email protected]>: > > > > > +1 for the performance enhancement. > > > If it make sense we could let the event listener to subscribe a center > > type > > > of event. > > > My question is how can we describe the event that the listener is > > > interested? > > > > > > > > > > > > Willem Jiang > > > > > > Blog: http://willemjiang.blogspot.com (English) > > > http://jnn.iteye.com (Chinese) > > > Twitter: willemjiang > > > Weibo: 姜宁willem > > > > > > On Sat, May 12, 2018 at 4:31 PM, wjm wjm <[email protected]> wrote: > > > > > > > currently we publish invocation start/startProcess/finish event for > > every > > > > invocation > > > > now event based on guava EventBus > > > > it's easy to use. > > > > > > > > but EventBus based on reflection, performance is not the best. > > > > in the furture maybe we will add more invocaiton event, and more > module > > > > will subscribe invocation event. > > > > > > > > so i want to publish invocation event, change from EventBus event to > > > event > > > > listener loaded by SPI. > > > > > > > > what's you suggestion? > > > > > > > > > >
