Reactive Stream Specification
package org.reactivestreams;
public interface Publisher<T> {
/**
* Subscribes the given Subscriber to this Publisher.
*/
public void subscribe(Subscriber<? super T> s);
}package org.reactivestreams;
public interface Subscriber<T> {
/**
* Receives a Subscription for managing the backpressure relationship with the Publisher.
*/
public void onSubscribe(Subscription s);
/**
* Processes the next element emitted by the Publisher.
*/
public void onNext(T t);
/**
* Handles an error condition emitted by the Publisher.
*/
public void onError(Throwable t);
/**
* Signals that the Publisher has completed emitting elements
*/
public void onComplete();
}Last updated