subject in rxjava
TRANSCRIPT
What’s the Subject?A Subject is a sort of bridge or proxy that acts both as a
Subscriber and as an Observable. Because it is a Subscriber, it can subscribe to one or more Observables, and because it is an Observable, it can pass through the
items it observes by reemitting them, and it can also emit new items.
Subject = Observable + Subscriber Observable 과 Subscriber 연결하는 다리같은 역할
2. BehaviorSubject기본적으로 BehaviorSubject 는 가장 최근에 관찰된 아이템과
그 후에 관찰된 나머지 아이템을 구독하는 Observer 에게 발행하는 Subject이다 .
참고자료
• http://goo.gl/ztz2as
• http://reactivex.io/documentation/subject.html
• http://www.introtorx.com/Content/v1.0.10621.0/02_KeyTypes.html#AsyncSubject
• http://www.introtorx.com/Content/v1.0.10621.0/02_KeyTypes.html#BehaviorSubject
• http://reactivex.io/RxJava/javadoc/rx/subjects/BehaviorSubject.html
• http://www.introtorx.com/Content/v1.0.10621.0/02_KeyTypes.html#ReplaySubject
• https://tech.instacart.com/how-to-think-about-subjects-part-1/