public class StringContent extends AbstractSinglePublisher<ContentChunk> implements ReactiveRequest.Content
Utility class that provides a String as reactive content.
| Constructor and Description |
|---|
StringContent(String string,
String mediaType,
Charset encoding) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType() |
long |
getLength() |
protected void |
onRequest(org.reactivestreams.Subscriber<? super ContentChunk> subscriber,
long n) |
cancel, isCancelled, onFailure, request, subscribe, subscriber, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfromPublisher, fromPublisher, fromStringpublic long getLength()
getLength in interface ReactiveRequest.Contentpublic String getContentType()
getContentType in interface ReactiveRequest.Contentmedia_type[;charset=<charset>]protected void onRequest(org.reactivestreams.Subscriber<? super ContentChunk> subscriber, long n)
onRequest in class AbstractSinglePublisher<ContentChunk>Copyright © 2017–2024 The Jetty Project. All rights reserved.