public static interface Flow.Processor
implements Publisher<R>, Subscriber<T>

java.util.concurrent.Flow.Processor<T, R>



A component that acts as both a Subscriber and Publisher.

Summary

Inherited methods

From interface java.util.concurrent.Flow.Publisher

abstract void subscribe(Subscriber<? super T> subscriber)

Adds the given Subscriber if possible.

From interface java.util.concurrent.Flow.Subscriber

abstract 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.

abstract void onError(Throwable throwable)

Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription.

abstract void onNext(T item)

Method invoked with a Subscription's next item.

abstract void onSubscribe(Flow.Subscription subscription)

Method invoked prior to invoking any other Subscriber methods for the given Subscription.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2025-02-10 UTC.