ReactiveRequest.Content, org.reactivestreams.Publisher<ContentChunk>public class TextContent extends AbstractSinglePublisher<ContentChunk> implements ReactiveRequest.Content
Utility class that provides a String as reactive content.
| Constructor | Description |
|---|---|
TextContent(String text,
String mediaType,
Charset encoding) |
| Modifier and Type | Method | Description |
|---|---|---|
String |
getContentType() |
|
long |
getLength() |
|
protected void |
onRequest(long n) |
cancel, onFailure, request, subscribe, subscriberpublic long getLength()
getLength in interface ReactiveRequest.Contentpublic String getContentType()
getContentType in interface ReactiveRequest.Contentmedia_type[;charset=<charset>]protected void onRequest(long n)
onRequest in class AbstractSinglePublisher<ContentChunk>Copyright © 2017 The Jetty Project. All rights reserved.