Skip to content

Instantly share code, notes, and snippets.

@trevorrjohn
Last active November 10, 2015 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorrjohn/c37c9ccc28ab2e6d51d6 to your computer and use it in GitHub Desktop.
Save trevorrjohn/c37c9ccc28ab2e6d51d6 to your computer and use it in GitHub Desktop.
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