greenrobot/EventBus

org.greenrobot.eventbus.EventBus#post doesn't support generic type.

Halcyon666 opened this issue · 3 comments

Q1 [org.greenrobot.eventbus.EventBus#post doesn't support generic type.]

  1. I integer the EventBus with SpringBoot, using @Configuration Inject MyselfEventBus which extends the greenrobot EventBus, and register the subscriber with generic param type .
  2. I post the event using the unanimous generic param type.
  3. THEN I CALL THE POST METHOD,THERE HINTS No subscribers registered for event XXX
  4. WHEN I remove both the generic param type in subscriber and post method, the eventBus works.

I don't know whether it is problem, maybe My usage situation is odds.

Q2 [through reflect invoke the method, and not return the result, how I design my program,maybe query the result later, could there have some callback or future]

Wish the replies, thanks guys

If I understand this correctly, see #23 about this.

If I understand this correctly, see #23 about this.

yeah, u are right. Thanks ,I’ll close the issue. One day maybe support this.