java - Publish-Subscribe Event Handlers - Static vs. Singleton -
i'm designing event bus, , stands, methods wishing subscribe events must static
, declaring classes registered directly class
objects. however, i'm aware guava includes an event bus accepts object
during registration , prefers instance methods subscribers. there advantage latter system? in practice i'm not sure of difference, object
registered singleton. i'd interested hear pros , cons.
Comments
Post a Comment