EventBus

4 views
Skip to first unread message

Duncan Child

unread,
Mar 12, 2009, 5:24:28 PM3/12/09
to geocra...@googlegroups.com, Dan Dromereschi
Does anyone know why the event bus also has a Manager and a ManagerFactory?

Any objections to switching it to be one class called EventBus that
has static methods for

publish
subscribe
unsubscribe

and a bunch of static final strings for common event names.

Thanks

Duncan

Dan Dromereschi

unread,
Mar 13, 2009, 12:11:08 PM3/13/09
to Duncan Child, geocra...@googlegroups.com
Duncan,

The changes you propose can be done, but I had some reasons in doing that design at that moment: I was thinking that maybe the event bus might have at some moment several implementations, so this is why there is an IEventBusManager and the implementation(s) for it is (are) hidden behind this interface. This way, the factory would be needed to return the correct implementation, based on some eventual parameters.

If we are sure this feature will never grow bigger than it is, we can safely transform the factory into a single class with static methods.

Regards,

Dan

Duncan Child

unread,
Mar 13, 2009, 12:18:28 PM3/13/09
to Dan Dromereschi, geocra...@googlegroups.com
Hi Dan,

Thanks for the response. I understand what you did now and can see
why. I just checked in something simpler that should be sufficient for
now.

Thanks

Duncan

Reply all
Reply to author
Forward
0 new messages