This interface has a simple method, which makes it possible to register subscribers that will eventually receive the data when it is available to consume. The following is the code for the Publisher interface:
public interface Publisher<T>
{ public void subscribe(Subscriber<? super T> s); }