public class ReactiveStreamsBodyGenerator extends Object implements FeedableBodyGenerator
| Constructor and Description |
|---|
ReactiveStreamsBodyGenerator(org.reactivestreams.Publisher<io.netty.buffer.ByteBuf> 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(io.netty.buffer.ByteBuf buffer,
boolean isLast) |
long |
getContentLength() |
org.reactivestreams.Publisher<io.netty.buffer.ByteBuf> |
getPublisher() |
void |
setListener(FeedListener listener) |
public ReactiveStreamsBodyGenerator(org.reactivestreams.Publisher<io.netty.buffer.ByteBuf> publisher,
long contentLength)
publisher - Body as a PublishercontentLength - Content-Length of the Bodypublic org.reactivestreams.Publisher<io.netty.buffer.ByteBuf> getPublisher()
public boolean feed(io.netty.buffer.ByteBuf 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 © 2021. All rights reserved.