Class ProxyContext


  • public class ProxyContext
    extends Object
    A controller for proxy interception.

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

    • Constructor Detail

      • ProxyContext

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

        public ProxyContext​(Object delegate)
    • Method Detail

      • getDelegate

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

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

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

        public ProxyResponse response()
        Returns:
        the proxy response, it might be null if the response has not been sent
      • sendRequest

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<ProxyResponse> sendRequest()

        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.
      • sendRequestAndAwait

        public ProxyResponse sendRequestAndAwait()
        Blocking variant of sendRequest().

        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 ProxyResponse instance produced by the operation.
      • sendRequestAndForget

        public void sendRequestAndForget()
        Variant of sendRequest() that ignores the result of the operation.

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

      • sendResponse

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> sendResponse()

        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.
      • sendResponseAndAwait

        public Void sendResponseAndAwait()
        Blocking variant of sendResponse().

        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.
      • sendResponseAndForget

        public void sendResponseAndForget()
        Variant of sendResponse() that ignores the result of the operation.

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

      • set

        public void set​(String name,
                        Object value)
        Parameters:
        name - the payload name
        value - any payload value
      • get

        public <T> T get​(String name,
                         Class<T> type)
        Parameters:
        name - the payload name
        type - the expected payload type
        Returns:
        the attached payload
      • newInstance

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