Debian Codegraph @

src/main/java/io/reactivex/rxjava3/core/FlowableSubscriber.java

raw
1 /*
2 * Copyright (c) 2016-present, RxJava Contributors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 * compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License is
10 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
11 * the License for the specific language governing permissions and limitations under the License.
12 */
13
14 package io.reactivex.rxjava3.core;
15
16 import org.reactivestreams.*;
17
18 import io.reactivex.rxjava3.annotations.NonNull;
19
20 /**
21 * Represents a Reactive-Streams inspired {@link Subscriber} that is RxJava 3 only
22 * and weakens the Reactive Streams rules <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.3'>§1.3</a>
23 * and <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.9'>§3.9</a> of the specification
24 * for gaining performance.
25 *
26 * <p>History: 2.0.7 - experimental; 2.1 - beta
27 * @param <T> the value type
28 * @since 2.2
29 */
30 public interface FlowableSubscriber<@NonNull T> extends Subscriber<T> {
31
32 /**
33 * Implementors of this method should make sure everything that needs
34 * to be visible in {@link #onNext(Object)} is established before
35 * calling {@link Subscription#request(long)}. In practice this means
36 * no initialization should happen after the {@code request()} call and
37 * additional behavior is thread safe in respect to {@code onNext}.
38 *
39 * {@inheritDoc}
40 */
41 @Override
42 void onSubscribe(@NonNull Subscription s);
43 }