Package org.reactfx
Interface Connectable<T>
-
- All Known Subinterfaces:
ConnectableEventSink<T>,ConnectableEventStream<T>
- All Known Implementing Classes:
ConnectableEventSource
public interface Connectable<T>Interface for objects that can be (lazily) connected to event streams. The semantics of a connection is left to the implementations of this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SubscriptionconnectTo(EventStream<? extends T> source)Connects this connectable object tosourceevent stream.
-
-
-
Method Detail
-
connectTo
Subscription connectTo(EventStream<? extends T> source)
Connects this connectable object tosourceevent stream. Implementations of this method should subscribe tosourcelazily, i.e. only subscribe tosourcewhen necessary, e.g. when the connectable object itself is being observed (e.g. itself has at least one subscriber).A
Connectablemay be connected to multiple sources at the same time.- Parameters:
source- event stream to (lazily) connect to.- Returns:
- subscription that can be used to disconnect this connectable
object from
source.
-
-