EventBus关系图
2016-11-01 11:24:30 0 举报
EventBus是一种基于发布/订阅模式的事件总线,它主要用于Android应用程序中各组件之间的通信。在EventBus的关系图中,主要包括三个部分:发布者(Publisher)、订阅者(Subscriber)和事件(Event)。发布者负责发布事件,订阅者负责订阅并处理事件,而事件则是发布者和订阅者之间传递的信息载体。当发布者发布一个事件时,所有已订阅该事件的订阅者都会收到该事件的通知,从而实现了组件之间的解耦和高效通信。EventBus通过简化组件之间的通信方式,提高了代码的可读性和可维护性,是Android开发中常用的通信工具之一。
作者其他创作
大纲/内容
BackgroundPoster
-queue : PendingPostQueue-eventBus:EventBus
SubscriberMethod
-method:Method-threadMode:ThreadMode-eventType:Class-methodString : String
HandlerPoster
EventBus
Subscription
-subscriber : Object-subscriberMethod : SubscriberMethod-priority : int
SubscriberMethodFinder
EventBusBuilder
组合
PendingPostQueue
-head : PendingPost-tail : PendingPost
PendingPost
-event : Object-subscription : Subscription-next : PendingPost
AsyncPoster
-queue:PendingPostQueue-eventBus : EventBus
0 条评论
下一页
为你推荐
查看更多