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

org.reactfx.EventSink Maven / Gradle / Ivy

package org.reactfx;

public interface EventSink {
    void push(T value);

    /**
     * Starts pushing all events emitted by {@code source} to this event sink.
     * 

An event sink can be fed from multiple sources at the same time. *

{@code sink.feedFrom(stream)} is equivalent to * {@code stream.feedTo(sink)} * @param source event stream whose events will be pushed to this event sink * @return subscription that can be used to stop delivering {@code source}'s * events to this event sink. * @see EventStream#feedTo(EventSink) */ default Subscription feedFrom(EventStream source) { return source.subscribe(this::push); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy