All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.descoped.rawdata.api.RawdataFlows Maven / Gradle / Ivy

The newest version!
package io.descoped.rawdata.api;

import java.util.concurrent.Flow;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Supplier;

public class RawdataFlows {

    public static Flow.Publisher publisher(Supplier consumer) {
        return new RawdataPublisher(consumer);
    }

    public static Flow.Subscriber subscriber(Supplier producer) {
        return new RawdataSubscriber(producer);
    }

    public static Flow.Subscriber subscriber(Supplier producer, Consumer onComplete) {
        return new RawdataSubscriber(producer, onComplete);
    }

    public static Flow.Subscriber subscriber(Supplier producer, BiConsumer onError) {
        return new RawdataSubscriber(producer, onError);
    }

    public static Flow.Subscriber subscriber(Supplier producer, Consumer onComplete, BiConsumer onError) {
        return new RawdataSubscriber(producer, onComplete, onError);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy