Skip to content

Emitter vs. Observer - what is the difference? #4787

Closed
@dkhmelenko

Description

@dkhmelenko

I discovered that there are two interfaces Emitter and Observer. Both of them have similar methods. The question is where should each of them be used?
Because Observable.create() receives as a parameter type Emitter and PublishSubject.subscribe() receives as a parameter type Observer (or Consumer). What makes impossible to use Emitter for subscribing in subject (and that was possible in RxJava 1.x).

Can somebody clarify or update documentation what is the difference between all of them and when should they be used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions