Stay organized with collections
Save and categorize content based on your preferences.
Flow.Processor
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.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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Flow.Processor\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Inherited Methods](#inhmethods) \n\nFlow.Processor\n==============\n\n\n`\npublic\nstatic\n\n\ninterface\nFlow.Processor\n`\n\n\n`\n\n\nimplements\n\n`[Publisher](/reference/java/util/concurrent/Flow.Publisher)`\u003cR\u003e,\n\n`[Subscriber](/reference/java/util/concurrent/Flow.Subscriber)`\u003cT\u003e\n\n\n`\n\n|---------------------------------------------|\n| java.util.concurrent.Flow.Processor\\\u003cT, R\\\u003e |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA component that acts as both a Subscriber and Publisher.\n\nSummary\n-------\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` `[java.util.concurrent.Flow.Publisher](/reference/java/util/concurrent/Flow.Publisher)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[subscribe](/reference/java/util/concurrent/Flow.Publisher#subscribe(java.util.concurrent.Flow.Subscriber\u003c?%20super%20T\u003e))`(`[Subscriber](/reference/java/util/concurrent/Flow.Subscriber)`\u003c? super T\u003e subscriber) ` Adds the given Subscriber if possible. | ||\n| From interface ` `[java.util.concurrent.Flow.Subscriber](/reference/java/util/concurrent/Flow.Subscriber)` ` |------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[onComplete](/reference/java/util/concurrent/Flow.Subscriber#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](/reference/java/util/concurrent/Flow.Subscriber#onError(java.lang.Throwable))`(`[Throwable](/reference/java/lang/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](/reference/java/util/concurrent/Flow.Subscriber#onNext(T))`(T item) ` Method invoked with a Subscription's next item. | | ` abstract void` | ` `[onSubscribe](/reference/java/util/concurrent/Flow.Subscriber#onSubscribe(java.util.concurrent.Flow.Subscription))`(`[Flow.Subscription](/reference/java/util/concurrent/Flow.Subscription)` subscription) ` Method invoked prior to invoking any other Subscriber methods for the given Subscription. | ||"]]