Top Fields Constructors Methods
org.reactfx

public final Class ConnectableEventSource<T>

extends EventStreamBase<T>
implements ConnectableEventStream<T>, ConnectableEventSink<T>
Class Inheritance
All Implemented Interfaces
org.reactfx.ConnectableEventSink, org.reactfx.Connectable, org.reactfx.EventSink, org.reactfx.ConnectableEventStream, org.reactfx.EventStream, org.reactfx.Observable
Imports
org.reactfx.util.MapHelper

Field Summary

Modifier and TypeField and Description
private MapHelper<EventStream<? extends T>, Subscription>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Subscription
connectTo(EventStream<? extends T> input)

Implements org.reactfx.Connectable.connectTo.

Connects this connectable object to source event stream.

protected final Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

public final void
push(T value)

Implements org.reactfx.EventSink.push.

private final Subscription
subscribeToInput(EventStream<? extends T> input)

Field Detail

subscriptionsback to summary
private MapHelper<EventStream<? extends T>, Subscription> subscriptions

Constructor Detail

ConnectableEventSourceback to summary
public ConnectableEventSource()

Method Detail

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

Implements org.reactfx.Connectable.connectTo.

Doc from org.reactfx.Connectable.connectTo.

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.

Annotations
@Override
observeInputsback to summary
protected final Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before newObserver(Object) is called for the first observer.

Annotations
@Override
pushback to summary
public final void push(T value)

Implements org.reactfx.EventSink.push.

Annotations
@Override
subscribeToInputback to summary
private final Subscription subscribeToInput(EventStream<? extends T> input)