public class ReactiveStreamsBodyGenerator extends Object implements FeedableBodyGenerator
| Constructor and Description |
|---|
ReactiveStreamsBodyGenerator(org.reactivestreams.Publisher<ByteBuffer> publisher,
long contentLength)
Creates a Streamable Body which takes a Content-Length.
|
| Modifier and Type | Method and Description |
|---|---|
Body |
createBody()
Creates a new instance of the request body to be read.
|
boolean |
feed(ByteBuffer buffer,
boolean isLast) |
long |
getContentLength() |
org.reactivestreams.Publisher<ByteBuffer> |
getPublisher() |
void |
setListener(FeedListener listener) |
public ReactiveStreamsBodyGenerator(org.reactivestreams.Publisher<ByteBuffer> publisher, long contentLength)
publisher - Body as a PublishercontentLength - Content-Length of the Bodypublic org.reactivestreams.Publisher<ByteBuffer> getPublisher()
public boolean feed(ByteBuffer buffer, boolean isLast) throws Exception
feed in interface FeedableBodyGeneratorExceptionpublic void setListener(FeedListener listener)
setListener in interface FeedableBodyGeneratorpublic long getContentLength()
public Body createBody()
BodyGeneratorcreateBody in interface BodyGeneratornull.Copyright © 2017. All Rights Reserved.