mutiny.zero.internal.EmptyPublisher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mutiny-zero Show documentation
Show all versions of mutiny-zero Show documentation
Mutiny Zero is a minimal API for creating reactive-streams compliant publishers
package mutiny.zero.internal;
import static java.util.Objects.requireNonNull;
import java.util.concurrent.Flow;
import java.util.concurrent.Flow.Publisher;
public class EmptyPublisher implements Publisher {
@Override
public void subscribe(Flow.Subscriber super T> subscriber) {
requireNonNull(subscriber, "The subscriber cannot be null");
subscriber.onSubscribe(new AlreadyCompletedSubscription());
subscriber.onComplete();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy