public class PacketStreamBody
extends java.lang.Object
implements org.asynchttpclient.request.body.Body
| Modifier and Type | Field and Description |
|---|---|
protected long |
contentLength |
protected java.util.concurrent.ConcurrentLinkedQueue<byte[]> |
queue |
protected services.moleculer.stream.PacketStream |
stream |
| Constructor and Description |
|---|
PacketStreamBody(services.moleculer.stream.PacketStream stream,
long contentLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getContentLength() |
void |
setListener(org.asynchttpclient.request.body.generator.FeedListener listener) |
org.asynchttpclient.request.body.Body.BodyState |
transferTo(io.netty.buffer.ByteBuf target) |
protected final java.util.concurrent.ConcurrentLinkedQueue<byte[]> queue
protected final services.moleculer.stream.PacketStream stream
protected final long contentLength
public PacketStreamBody(services.moleculer.stream.PacketStream stream,
long contentLength)
public void setListener(org.asynchttpclient.request.body.generator.FeedListener listener)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic long getContentLength()
getContentLength in interface org.asynchttpclient.request.body.Bodypublic org.asynchttpclient.request.body.Body.BodyState transferTo(io.netty.buffer.ByteBuf target)
throws java.io.IOException
transferTo in interface org.asynchttpclient.request.body.Bodyjava.io.IOException