001package org.reactivestreams; 002 003public interface Publisher<T> { 004 005 /** 006 * Request {@link Publisher} to start streaming data. 007 * <p> 008 * This is a "factory method" and can be called multiple times, each time starting a new {@link Subscription}. 009 * <p> 010 * Each {@link Subscription} will work for only a single {@link Subscriber}. 011 * <p> 012 * A {@link Subscriber} should only subscribe once to a single {@link Publisher}. 013 * <p> 014 * If the {@link Publisher} rejects the subscription attempt or otherwise fails it will 015 * signal the error via {@link Subscriber#onError}. 016 * 017 * @param s the {@link Subscriber} that will consume signals from this {@link Publisher} 018 */ 019 public void subscribe(Subscriber<? super T> s); 020}