![]() ![]() Autobus accomplishes this task with BusObservable API. Explicit contract between subscribers and emittersĪs one of the common use case of Event Buses is the communication between interactors (asynchronous core operations of an app) and presenters (adapters between views and interactors) it is desirable to maintain an explicit definition or contract between the emitters and the subscribers. ![]() Listening to channel C and expecting data of any class are notified. When an emitter sends data ofĬlass D to a channel C, every subscriber listening to channel C and expecting data of class D is notified. Of data) and emitters can send data of a concrete class (or no data at all) to a concrete channel. This approach is valid but it is quite inflexible.Īutobus allows representing channels as Strings andĭata as a separate class this way a subscriber can listen to a channel expecting a concrete class of data (or even Any class We developed our own Event Bus to cover two main needs that aren't covered by existing libraries:īoth Otto and EventBus use Events (defined classes) to carry data and also to represent the channel the subscribersĪre listening to. It is based on concepts from Otto, EventBus and RxJava.įor usage instructions please see Autobus website. An enhanced event bus intended to allow communication between decoupled parts of an application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |