Class VertxJavaIoContext

java.lang.Object
io.quarkus.vertx.utils.VertxJavaIoContext

public class VertxJavaIoContext extends Object
A context giving access to Vert.x RoutingContext and to some configuration values.
  • 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

      public Optional<String> getContentLength()
      You may want to override this method letting it return a non-empty Optional if your framework needs to pass a user defined content length to the underlying VertxOutputStream.

      The default implementation always returns an empty Optional.

      Returns:
      Optional.empty()