Top Description Fields Constructors Methods
rx.internal.operators

public final Class OperatorMulticast<T, R>

extends ConnectableObservable<R>
Class Inheritance
Type Parameters
<T>
the source value type
<R>
the result value type
Imports
java.util.*, java.util.concurrent.atomic.AtomicReference, rx.*, .Observable, rx.functions.*, rx.observables.ConnectableObservable, rx.observers.Subscribers, rx.subjects.Subject, rx.subscriptions.Subscriptions

Shares a single subscription to a source through a Subject.

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicReference<Subject<? super T, ? extends R>>
pack-priv final Object
pack-priv Subscription
pack-priv final Observable<? extends T>
pack-priv final Func0<? extends Subject<? super T, ? extends R>>
pack-priv Subscriber<T>
subscription

Guarded by guard.

pack-priv final List<Subscriber<? super R>>

Constructor Summary

AccessConstructor and Description
public
OperatorMulticast(Observable<? extends T> source, final Func0<? extends Subject<? super T, ? extends R>> subjectFactory)

private
OperatorMulticast(final Object guard, final AtomicReference<Subject<? super T, ? extends R>> connectedSubject, final List<Subscriber<? super R>> waitingForConnect, Observable<? extends T> source, final Func0<? extends Subject<? super T, ? extends R>> subjectFactory)

Method Summary

Modifier and TypeMethod and Description
public void
connect(Action1<? super Subscription>
the action that receives the connection subscription before the subscription to source happens allowing the caller to synchronously disconnect a synchronous source
connection
)

Implements abstract rx.observables.ConnectableObservable.connect.

Instructs the ConnectableObservable to begin emitting the items from its underlying Observable to its Subscribers.
Inherited from rx.observables.ConnectableObservable:
autoConnectautoConnectautoConnectconnectrefCount

Field Detail

connectedSubjectback to summary
pack-priv final AtomicReference<Subject<? super T, ? extends R>> connectedSubject
guardback to summary
pack-priv final Object guard
guardedSubscriptionback to summary
pack-priv Subscription guardedSubscription
sourceback to summary
pack-priv final Observable<? extends T> source
subjectFactoryback to summary
pack-priv final Func0<? extends Subject<? super T, ? extends R>> subjectFactory
subscriptionback to summary
pack-priv Subscriber<T> subscription

Guarded by guard.

waitingForConnectback to summary
pack-priv final List<Subscriber<? super R>> waitingForConnect

Constructor Detail

OperatorMulticastback to summary
public OperatorMulticast(Observable<? extends T> source, final Func0<? extends Subject<? super T, ? extends R>> subjectFactory)
OperatorMulticastback to summary
private OperatorMulticast(final Object guard, final AtomicReference<Subject<? super T, ? extends R>> connectedSubject, final List<Subscriber<? super R>> waitingForConnect, Observable<? extends T> source, final Func0<? extends Subject<? super T, ? extends R>> subjectFactory)

Method Detail

connectback to summary
public void connect(Action1<? super Subscription> connection)

Implements abstract rx.observables.ConnectableObservable.connect.

Doc from rx.observables.ConnectableObservable.connect.

Instructs the ConnectableObservable to begin emitting the items from its underlying Observable to its Subscribers.

Parameters
connection:Action1<? super Subscription>

the action that receives the connection subscription before the subscription to source happens allowing the caller to synchronously disconnect a synchronous source

Annotations
@SuppressWarnings:unchecked
@Override