
org.reactfx.Connectable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reactfx Show documentation
Show all versions of reactfx Show documentation
Reactive event streams for JavaFX
package org.reactfx;
/**
* Interface for objects that can be (lazily) connected to event streams.
* The semantics of a connection is left to the implementations of this
* interface.
*/
public interface Connectable {
/**
* Connects this connectable object to {@code source} event stream.
* Implementations of this method should subscribe to {@code source}
* lazily, i.e. only subscribe to {@code source} when necessary, e.g.
* when the connectable object itself is being observed (e.g. itself
* has at least one subscriber).
* A {@code Connectable} may be connected to multiple sources at
* the same time.
* @param source event stream to (lazily) connect to.
* @return subscription that can be used to disconnect this connectable
* object from {@code source}.
*/
Subscription connectTo(EventStream extends T> source);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy