Skip to content

Instantly share code, notes, and snippets.

@sdeleuze
Last active February 8, 2016 12:06
Show Gist options
  • Save sdeleuze/4e291a139b9ec3c10137 to your computer and use it in GitHub Desktop.
Save sdeleuze/4e291a139b9ec3c10137 to your computer and use it in GitHub Desktop.
Reactive Streams interfaces
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 Subscription {
void request(long n);
void cancel();
}
public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment