Skip to content

Instantly share code, notes, and snippets.

@rocketpages
Created August 22, 2015 02:39
Show Gist options
  • Select an option

  • Save rocketpages/9dd9d697ee980145f313 to your computer and use it in GitHub Desktop.

Select an option

Save rocketpages/9dd9d697ee980145f313 to your computer and use it in GitHub Desktop.
public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {}
public interface Publisher<T> {
public void subscribe(Subscriber<? super T> s);
}
public interface Subscriber<T> {
public void onSubscribe(Subscription s);
public void onNext(T t);
public void onError(Throwable t);
public void onComplete();
}
public interface Subscription {
public void request(long n);
public void cancel();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment