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.
Content.Source can be consumed only once and does not support multicast subscription.
Content.Source will be consumed fully, otherwise will be failed in case of any errors
to prevent resource leaks.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidsubscribe(Flow.Subscriber<? super Content.Chunk> subscriber) 
- 
Constructor Details- 
ContentSourcePublisher
 
- 
- 
Method Details- 
subscribe- Specified by:
- subscribein interface- Flow.Publisher<Content.Chunk>
 
 
-