Package rx.internal.operators
Class OnSubscribeAutoConnect<T>
- java.lang.Object
-
- rx.internal.operators.OnSubscribeAutoConnect<T>
-
- Type Parameters:
T
- the value type of the chain
- All Implemented Interfaces:
Action
,Action1<Subscriber<? super T>>
,Function
,Observable.OnSubscribe<T>
public final class OnSubscribeAutoConnect<T> extends java.lang.Object implements Observable.OnSubscribe<T>
Wraps a ConnectableObservable and calls its connect() method once the specified number of Subscribers have subscribed.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.atomic.AtomicInteger
clients
(package private) Action1<? super Subscription>
connection
(package private) int
numberOfSubscribers
(package private) ConnectableObservable<? extends T>
source
-
Constructor Summary
Constructors Constructor Description OnSubscribeAutoConnect(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(Subscriber<? super T> child)
-
-
-
Field Detail
-
source
final ConnectableObservable<? extends T> source
-
numberOfSubscribers
final int numberOfSubscribers
-
connection
final Action1<? super Subscription> connection
-
clients
final java.util.concurrent.atomic.AtomicInteger clients
-
-
Constructor Detail
-
OnSubscribeAutoConnect
public OnSubscribeAutoConnect(ConnectableObservable<? extends T> source, int numberOfSubscribers, Action1<? super Subscription> connection)
-
-
Method Detail
-
call
public void call(Subscriber<? super T> child)
-
-