generateState(S) ,
next(S, Long, Observer), and
onUnsubscribe(S).
Subscribers that will be compatible with this.
OnSubscribe<T> functions that respond correctly to back
pressure requests from subscribers. This is an improvement over
Observable.create(OnSubscribe) which does not provide
any means of managing back pressure requests out-of-the-box. This variant of an OnSubscribe
function allows for the asynchronous processing of requests.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | AsyncOnSubscribe.AsyncOnSubscribeImpl<
the type of the user-defined state S, the type of compatible Subscribers T>An implementation of AsyncOnSubscribe that delegates
|
| pack-priv static class | |
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public static < the type of the associated state with each Subscriber S, the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data in a protocol compatible with back-pressure.generates the initial state value (see generator, final Action3<? super S, Long, ? super Observer<Observable<? extends T>>> generateState())produces data to the downstream subscriber (see
next)next(S, long, Observer))Generates a synchronous |
| public static < the type of the associated state with each Subscriber S, the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data downstream in a protocol compatible with back-pressure.generates the initial state value (see generator, final Action3<? super S, Long, ? super Observer<Observable<? extends T>>> generateState())produces data to the downstream subscriber (see
next, final Action1<? super S> next(S, long, Observer))clean up behavior (see onUnsubscribe)onUnsubscribe(S))Generates a synchronous |
| public static < the type of the associated state with each Subscriber S, the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data downstream in a protocol compatible with back-pressure.generates the initial state value (see generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> generateState())produces data to the downstream subscriber (see
next, Action1<? super S> next(S, long, Observer))clean up behavior (see onUnsubscribe)onUnsubscribe(S))Generates a synchronous |
| public static < the type of the associated state with each Subscriber S, the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data downstream in a protocol compatible with back-pressure.generates the initial state value (see generator, Func3<? super S, Long, ? super Observer<Observable<? extends T>>, ? extends S> generateState())produces data to the downstream subscriber (see
next)next(S, long, Observer))Generates a synchronous |
| public static < the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data downstream in a protocol compatible with back-pressure.produces data to the downstream subscriber (see
next)next(S, long, Observer))Generates a synchronous |
| public static < the type of the generated values T> AsyncOnSubscribe | Returns: an AsyncOnSubscribe that emits data downstream in a protocol compatible with back-pressure.produces data to the downstream subscriber (see
next, final Action0 next(S, long, Observer))clean up behavior (see onUnsubscribe)onUnsubscribe(S))Generates a synchronous |
| protected abstract S | Returns: the initial state valueExecuted once when subscribed to by a subscriber (via |
| protected abstract S | Returns: the next iteration's state valuethe state value (from state, long generateState() on the first invocation or the
previous invocation of this method.the amount of data requested. An observable emitted to the observer should not
exceed this amount. requested, Observer<Observable<? extends T>> the observer of data emitted by observer)Called to produce data to the downstream subscribers. |
| protected void | onUnsubscribe(S
the last state value returned from state)next(S, Long, Observer) or
generateState() at the time when a terminal event is emitted from
next(Object, long, Observer) or unsubscribing.Clean up behavior that is executed after the downstream subscriber's subscription is unsubscribed. |