Subscriber

This interface is where the action happens. The following methods have names that are self-describing:

public interface Subscriber<T> 
{ public void onSubscribe(Subscription s); public void onNext(T t); public void onError(Throwable t); public void onComplete(); }

With each of the previously mentioned methods, you can register a callback that will be invoked under the appropriate circumstances, as follows: