Package io.quarkus.vertx.utils
Class VertxJavaIoContext
java.lang.Object
io.quarkus.vertx.utils.VertxJavaIoContext
A context giving access to Vert.x
RoutingContext and to some configuration values.-
Constructor Summary
ConstructorsConstructorDescriptionVertxJavaIoContext(io.vertx.ext.web.RoutingContext context, int minChunkSize, int outputBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionYou may want to override this method letting it return a non-emptyOptionalif your framework needs to pass a user defined content length to the underlyingVertxOutputStream.intReturns the size of the chunks of memory allocated when writing data in bytes.intReturns the capacity of the underlying response buffer in bytes.io.vertx.ext.web.RoutingContext
-
Constructor Details
-
VertxJavaIoContext
public VertxJavaIoContext(io.vertx.ext.web.RoutingContext context, int minChunkSize, int outputBufferSize)
-
-
Method Details
-
getRoutingContext
public io.vertx.ext.web.RoutingContext getRoutingContext()- Returns:
- the Vert.x routing context
-
getMinChunkSize
public int getMinChunkSize()Returns the size of the chunks of memory allocated when writing data in bytes.- Returns:
- the size of the chunks of memory allocated when writing data in bytes
-
getOutputBufferCapacity
public int getOutputBufferCapacity()Returns the capacity of the underlying response buffer in bytes. If a response is larger than this and no content-length is provided then the request will be chunked.Larger values may give slight performance increases for large responses, at the expense of more memory usage.
- Returns:
- the capacity of the underlying response buffer in bytes
-
getContentLength
You may want to override this method letting it return a non-emptyOptionalif your framework needs to pass a user defined content length to the underlyingVertxOutputStream.The default implementation always returns an empty
Optional.- Returns:
Optional.empty()
-