public static interface
Flow.Processor
implements
Subscriber<T>
Publisher<R>
Flow.Processor
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eFlow.Processor\u003c/code\u003e acts as both a subscriber, receiving items, and a publisher, producing items.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits methods from \u003ccode\u003eFlow.Subscriber\u003c/code\u003e for handling incoming items: \u003ccode\u003eonNext\u003c/code\u003e, \u003ccode\u003eonError\u003c/code\u003e, \u003ccode\u003eonComplete\u003c/code\u003e, and \u003ccode\u003eonSubscribe\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt also inherits \u003ccode\u003esubscribe\u003c/code\u003e from \u003ccode\u003eFlow.Publisher\u003c/code\u003e to allow other subscribers to receive its output.\u003c/p\u003e\n"]]],[],null,["public static interface **Flow.Processor** implements [Subscriber](../../../../reference/java/util/concurrent/Flow.Subscriber.html)\\\u003cT\\\u003e [Publisher](../../../../reference/java/util/concurrent/Flow.Publisher.html)\\\u003cR\\\u003e \nA component that acts as both a Subscriber and Publisher. \n\nInherited Method Summary \nFrom interface [java.util.concurrent.Flow.Subscriber](../../../../reference/java/util/concurrent/Flow.Subscriber.html) \n\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [onComplete](../../../../reference/java/util/concurrent/Flow.Subscriber.html#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. |\n| abstract void | [onError](../../../../reference/java/util/concurrent/Flow.Subscriber.html#onError(java.lang.Throwable))([Throwable](../../../../reference/java/lang/Throwable.html) throwable) Method invoked upon an unrecoverable error encountered by a Publisher or Subscription, after which no other Subscriber methods are invoked by the Subscription. |\n| abstract void | [onNext](../../../../reference/java/util/concurrent/Flow.Subscriber.html#onNext(T))(T item) Method invoked with a Subscription's next item. |\n| abstract void | [onSubscribe](../../../../reference/java/util/concurrent/Flow.Subscriber.html#onSubscribe(java.util.concurrent.Flow.Subscription))([Flow.Subscription](../../../../reference/java/util/concurrent/Flow.Subscription.html) subscription) Method invoked prior to invoking any other Subscriber methods for the given Subscription. |\n\nFrom interface [java.util.concurrent.Flow.Publisher](../../../../reference/java/util/concurrent/Flow.Publisher.html) \n\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [subscribe](../../../../reference/java/util/concurrent/Flow.Publisher.html#subscribe(java.util.concurrent.Flow.Subscriber\u003c?%20super%20T\u003e))([Subscriber](../../../../reference/java/util/concurrent/Flow.Subscriber.html)\\\u003c? super T\\\u003e subscriber) Adds the given Subscriber if possible. |"]]