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

org.reactfx.EventSource Maven / Gradle / Ivy

There is a newer version: 1.11
Show newest version
package org.reactfx;


/**
 * EventSource is an EventSink that serves also as an EventStream - every value
 * pushed to EventSource is immediately emitted by it.
 * @param  type of values this EventSource accepts and emits.
 */
public class EventSource
extends EventStreamBase
implements EventSink {

    /**
     * Make this event stream immediately emit the given value.
     */
    @Override
    public final void push(T value) {
        emit(value);
    }

    @Override
    protected final Subscription observeInputs() {
        return Subscription.EMPTY;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy