public class BodyGeneratorStream
extends org.asynchttpclient.request.body.generator.QueueBasedFeedableBodyGenerator<java.util.concurrent.ConcurrentLinkedQueue<org.asynchttpclient.request.body.generator.BodyChunk>>
implements org.asynchttpclient.request.body.generator.BodyGenerator, io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
Constructor and Description |
---|
BodyGeneratorStream(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> bodyStream) |
Modifier and Type | Method and Description |
---|---|
org.asynchttpclient.request.body.Body |
createBody() |
BodyGeneratorStream |
drainHandler(io.vertx.core.Handler<java.lang.Void> handler) |
void |
end() |
void |
end(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler) |
BodyGeneratorStream |
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler) |
protected boolean |
offer(org.asynchttpclient.request.body.generator.BodyChunk chunk) |
BodyGeneratorStream |
setWriteQueueMaxSize(int maxSize) |
BodyGeneratorStream |
write(io.vertx.core.buffer.Buffer data) |
io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer> |
write(io.vertx.core.buffer.Buffer data,
io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler) |
boolean |
writeQueueFull() |
feed, setListener
public BodyGeneratorStream(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> bodyStream)
public org.asynchttpclient.request.body.Body createBody()
createBody
in interface org.asynchttpclient.request.body.generator.BodyGenerator
createBody
in class org.asynchttpclient.request.body.generator.QueueBasedFeedableBodyGenerator<java.util.concurrent.ConcurrentLinkedQueue<org.asynchttpclient.request.body.generator.BodyChunk>>
protected boolean offer(org.asynchttpclient.request.body.generator.BodyChunk chunk)
offer
in class org.asynchttpclient.request.body.generator.QueueBasedFeedableBodyGenerator<java.util.concurrent.ConcurrentLinkedQueue<org.asynchttpclient.request.body.generator.BodyChunk>>
public BodyGeneratorStream exceptionHandler(io.vertx.core.Handler<java.lang.Throwable> handler)
exceptionHandler
in interface io.vertx.core.streams.StreamBase
exceptionHandler
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public BodyGeneratorStream setWriteQueueMaxSize(int maxSize)
setWriteQueueMaxSize
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public boolean writeQueueFull()
writeQueueFull
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public BodyGeneratorStream drainHandler(io.vertx.core.Handler<java.lang.Void> handler)
drainHandler
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public BodyGeneratorStream write(io.vertx.core.buffer.Buffer data)
write
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer> write(io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler)
write
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public void end()
end
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
public void end(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>> handler)
end
in interface io.vertx.core.streams.WriteStream<io.vertx.core.buffer.Buffer>
Copyright © 2021. All Rights Reserved.