Package rx.internal.operators
Class OnSubscribeFromCallable<T>
- java.lang.Object
-
- rx.internal.operators.OnSubscribeFromCallable<T>
-
- Type Parameters:
T
- the value type emitted
- All Implemented Interfaces:
Action
,Action1<Subscriber<? super T>>
,Function
,Observable.OnSubscribe<T>
public final class OnSubscribeFromCallable<T> extends java.lang.Object implements Observable.OnSubscribe<T>
Do not invoke the function until an Observer subscribes; Invokes function on each subscription.Pass
fromCallable
a function, andfromCallable
will call this function to emit result of invocation afresh each time a new Observer subscribes.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.Callable<? extends T>
resultFactory
-
Constructor Summary
Constructors Constructor Description OnSubscribeFromCallable(java.util.concurrent.Callable<? extends T> resultFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(Subscriber<? super T> subscriber)
-
-
-
Field Detail
-
resultFactory
private final java.util.concurrent.Callable<? extends T> resultFactory
-
-
Constructor Detail
-
OnSubscribeFromCallable
public OnSubscribeFromCallable(java.util.concurrent.Callable<? extends T> resultFactory)
-
-
Method Detail
-
call
public void call(Subscriber<? super T> subscriber)
-
-