Last active
November 10, 2015 16:47
-
-
Save trevorrjohn/c37c9ccc28ab2e6d51d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.create(OnSubscribe<T> onSubscribe); | |
public interface OnSubscribe<T> { | |
void call(Subscriber<T> subscriber); | |
} | |
public abstract class Subscriber<T> | |
implements Observer<T>, Subscription { /**/ } | |
public interface Observer<T> { | |
void onCompleted(); | |
void onError(Throwable e); | |
void onNext(T t); | |
} | |
public interface Subscription { | |
void unsubscribe(); | |
boolean isUnsubscribed(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment