Skip to content

Instantly share code, notes, and snippets.

@anotherdev
Last active January 4, 2017 17:25
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 anotherdev/0eb98f484f909321912162f89abfbadc to your computer and use it in GitHub Desktop.
Save anotherdev/0eb98f484f909321912162f89abfbadc to your computer and use it in GitHub Desktop.
public interface Publisher<T> {
void subscribe(Subscriber<? super T> s);
}
public interface Subscriber<T> {
void onSubscribe(Subscription s);
void onNext(T t);
void onError(Throwable t);
void onComplete();
}
public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {
}
public interface Subscription {
void request(long n);
void cancel();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment