RxJava的四种Subjects:PublishSubject、ReplaySubject、BehaviorSubject、AsyncSubject的理解
Subject:它既是Observable,又是observer。也就是既可以发送事件,也可以接收事件。PublishSubjectsource=PublishSubject.create();//PublicSubject:接收到订阅之后的所有数据。//Itwillget1,2,3,4andonCompletesource.subscribe(getFirstObserver());source