You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spi/src/main/java/org/reactivestreams/spi/Subscriber.java
+3-8
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ public interface Subscriber<T> {
11
11
* The {@link org.reactivestreams.spi.Publisher Publisher} generates a {@link org.reactivestreams.spi.Subscription Subscription} upon {@link org.reactivestreams.spi.Publisher#subscribe(org.reactivestreams.spi.Subscriber) subscribe} and passes
12
12
* it on to the Subscriber named there using this method. The Publisher may choose to reject
13
13
* the subscription request by calling {@link #onError onError} instead.
14
-
*
15
14
* @param subscription The subscription which connects this subscriber to its publisher.
16
15
*/
17
16
publicvoidonSubscribe(Subscriptionsubscription);
@@ -20,28 +19,24 @@ public interface Subscriber<T> {
20
19
* The {@link org.reactivestreams.spi.Publisher Publisher} calls this method to pass one element to this Subscriber. The element
21
20
* must not be <code>null</code>. The Publisher must not call this method more often than
22
21
* the Subscriber has signaled demand for via the corresponding {@link org.reactivestreams.spi.Subscription Subscription}.
23
-
*
24
22
* @param element The element that is passed from publisher to subscriber.
25
23
*/
26
24
publicvoidonNext(Telement);
27
25
28
26
/**
29
27
* The {@link org.reactivestreams.spi.Publisher Publisher} calls this method in order to signal that it terminated normally.
30
-
* No more elements will be forthcoming and none of the Subscriber’s methods will be
31
-
* called hereafter.
28
+
* No more elements will be forthcoming and none of the Subscriber’s methods will be called hereafter.
32
29
*/
33
30
publicvoidonComplete();
34
31
35
32
/**
36
33
* The {@link org.reactivestreams.spi.Publisher Publisher} calls this method to signal that the stream of elements has failed
37
34
* and is being aborted. The Subscriber should abort its processing as soon as possible.
38
-
* No more elements will be forthcoming and none of the Subscriber’s methods will be
39
-
* called hereafter.
40
-
*
35
+
* No more elements will be forthcoming and none of the Subscriber’s methods will be called hereafter.
36
+
* <p>
41
37
* This method is not intended to pass validation errors or similar from Publisher to Subscriber
42
38
* in order to initiate an orderly shutdown of the exchange; it is intended only for fatal
43
39
* failure conditions which make it impossible to continue processing further elements.
44
-
*
45
40
* @param cause An exception which describes the reason for tearing down this stream.
0 commit comments