Top Description Methods
org.reactfx

public Interface Connectable<T>

Known Direct Subinterfaces
org.reactfx.ConnectableEventSink, org.reactfx.ConnectableEventStream

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

Modifier and TypeMethod and Description
public Subscription

Returns:

subscription that can be used to disconnect this connectable object from source.
connectTo
(EventStream<? extends T>
event stream to (lazily) connect to.
source
)

Connects this connectable object to source event stream.

Method Detail

connectToback to summary
public Subscription connectTo(EventStream<? extends T> source)

Connects this connectable object to source event stream. Implementations of this method should subscribe to source lazily, i.e. only subscribe to source when necessary, e.g. when the connectable object itself is being observed (e.g. itself has at least one subscriber).

A Connectable may be connected to multiple sources at the same time.

Parameters
source:EventStream<? extends T>

event stream to (lazily) connect to.

Returns:Subscription

subscription that can be used to disconnect this connectable object from source.