Package org.eclipse.jetty.io.content
Class ContentSourcePublisher
java.lang.Object
org.eclipse.jetty.io.content.ContentSourcePublisher
- All Implemented Interfaces:
Flow.Publisher<Content.Chunk>
Wraps a Content.Source
as a Flow.Publisher
.
When content is requested via Flow.Subscription.request(long)
, it is
read from the passed Content.Source
and passed to Flow.Subscriber.onNext(Object)
.
If no content is available, then the Content.Source.demand(Runnable)
method is used to
ultimately call Flow.Subscriber.onNext(Object)
once content is available.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
subscribe
(Flow.Subscriber<? super Content.Chunk> subscriber)
-
Constructor Details
-
ContentSourcePublisher
-
-
Method Details
-
subscribe
- Specified by:
subscribe
in interfaceFlow.Publisher<Content.Chunk>
-