Class ProxyResponse


  • public class ProxyResponse
    extends Object
    Handles the interoperability of the response between the origin and the user agent.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • ProxyResponse

        public ProxyResponse​(io.vertx.httpproxy.ProxyResponse delegate)
      • ProxyResponse

        public ProxyResponse​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.httpproxy.ProxyResponse getDelegate()
      • hashCode

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

        public ProxyRequest request()
        Returns:
        the proxy request
      • getStatusCode

        public int getStatusCode()
        Returns:
        the status code to be sent to the user agent
      • setStatusCode

        public ProxyResponse setStatusCode​(int sc)
        Parameters:
        sc - the status code
        Returns:
        a reference to this, so the API can be used fluently
      • getStatusMessage

        public String getStatusMessage()
        Returns:
        the status message to be sent to the user agent
      • setStatusMessage

        public ProxyResponse setStatusMessage​(String statusMessage)
        Parameters:
        statusMessage - the status message
        Returns:
        a reference to this, so the API can be used fluently
      • headers

        public MultiMap headers()
        Returns:
        the headers that will be sent to the user agent, the returned headers can be modified. The headers map is populated with the proxied response headers
      • getBody

        public Body getBody()
        Returns:
        the response body to be sent to the user agent
      • setBody

        public ProxyResponse setBody​(Body body)
        Parameters:
        body - the new body
        Returns:
        a reference to this, so the API can be used fluently
      • publicCacheControl

        public boolean publicCacheControl()
      • maxAge

        public long maxAge()
      • etag

        public String etag()
        Returns:
        the etag sent by the origin response
      • send

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> send()
        Send the proxies response to the user agent.

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

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • sendAndAwait

        public Void sendAndAwait()
        Blocking variant of send().

        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).

        Returns:
        the Void instance produced by the operation.
      • sendAndForget

        public void sendAndForget()
        Variant of send() that ignores the result of the operation.

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

      • release

        public ProxyResponse release()
        Returns:
        the instance of ProxyResponse to chain method calls.
      • newInstance

        public static ProxyResponse newInstance​(io.vertx.httpproxy.ProxyResponse arg)