Class ValidatedResponse

java.lang.Object
io.vertx.mutiny.openapi.validation.ValidatedResponse
All Implemented Interfaces:
MutinyDelegate

public class ValidatedResponse extends Object implements MutinyDelegate
  • Field Details

  • Constructor Details

    • ValidatedResponse

      public ValidatedResponse(io.vertx.openapi.validation.ValidatedResponse delegate)
    • ValidatedResponse

      public ValidatedResponse(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.openapi.validation.ValidatedResponse getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getHeaders

      public Map<String,ResponseParameter> getHeaders()
      Returns:
      the header parameters.
    • getBody

      public ResponseParameter getBody()
      Returns:
      the body.
    • send

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> send(HttpServerResponse serverResponse)
      Add all parameters from the validated response to the passed and send it.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      serverResponse - The related response
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • sendAndAwait

      public Void sendAndAwait(HttpServerResponse serverResponse)
      Blocking variant of send(io.vertx.mutiny.core.http.HttpServerResponse).

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      serverResponse - The related response
      Returns:
      the Void instance produced by the operation.
    • sendAndForget

      public void sendAndForget(HttpServerResponse serverResponse)
      Variant of send(io.vertx.mutiny.core.http.HttpServerResponse) that ignores the result of the operation.

      This method subscribes on the result of send(io.vertx.mutiny.core.http.HttpServerResponse), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from send(io.vertx.mutiny.core.http.HttpServerResponse) but you don't need to compose it with other operations.

      Parameters:
      serverResponse - The related response
    • newInstance

      public static ValidatedResponse newInstance(io.vertx.openapi.validation.ValidatedResponse arg)