public class ReactiveStreamsBodyGenerator extends java.lang.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 java.lang.Exception
feed
in interface FeedableBodyGenerator
java.lang.Exception
public void setListener(FeedListener listener)
setListener
in interface FeedableBodyGenerator
public long getContentLength()
public Body createBody()
BodyGenerator
createBody
in interface BodyGenerator
null
.Copyright © 2018. All Rights Reserved.