T
- the subscribed item typeFlow.Processor<T,R>
, HttpResponse.BodySubscriber<T>
Flow
public static interface Flow.Subscriber<T>
Flow.Subscription
.Modifier and Type | Method | Description |
---|---|---|
void |
onComplete() |
Method invoked when it is known that no additional Subscriber method invocations will occur for a Subscription that is not already terminated by error, after which no other Subscriber methods are invoked by the Subscription. |
void |
onError |
Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. |
void |
onNext |
Method invoked with a Subscription's next item. |
void |
onSubscribe |
Method invoked prior to invoking any other Subscriber methods for the given Subscription. |
void onSubscribe(Flow.Subscription subscription)
Typically, implementations of this method invoke
subscription.request
to enable receiving items.
subscription
- a new subscriptionvoid onNext(T item)
item
- the itemvoid onError(Throwable throwable)
throwable
- the exceptionvoid onComplete()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/concurrent/Flow.Subscriber.html