Class HttpProxy

  • All Implemented Interfaces:
    io.vertx.core.Handler<io.vertx.mutiny.core.http.HttpServerRequest>, Consumer<io.vertx.mutiny.core.http.HttpServerRequest>

    public class HttpProxy
    extends Object
    implements io.vertx.core.Handler<io.vertx.mutiny.core.http.HttpServerRequest>, Consumer<io.vertx.mutiny.core.http.HttpServerRequest>
    Handles the HTTP reverse proxy logic between the user agent and the origin.

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

    • Field Detail

      • __TYPE_ARG

        public static final io.smallrye.mutiny.vertx.TypeArg<HttpProxy> __TYPE_ARG
    • Constructor Detail

      • HttpProxy

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

        public HttpProxy​(Object delegate)
    • Method Detail

      • getDelegate

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

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

        public static HttpProxy reverseProxy​(io.vertx.mutiny.core.http.HttpClient client)
        Parameters:
        client - the HttpClient that forwards outbound requests to the origin.
        Returns:
        a reference to this, so the API can be used fluently.
      • reverseProxy

        public static HttpProxy reverseProxy​(io.vertx.httpproxy.ProxyOptions options,
                                             io.vertx.mutiny.core.http.HttpClient client)
        Parameters:
        options -
        client - the HttpClient that forwards outbound requests to the origin.
        Returns:
        a reference to this, so the API can be used fluently.
      • origin

        public HttpProxy origin​(io.vertx.mutiny.core.net.SocketAddress address)
        Parameters:
        address - the SocketAddress of the origin
        Returns:
        a reference to this, so the API can be used fluently
      • origin

        public HttpProxy origin​(int port,
                                String host)
        Parameters:
        port - the port number of the origin server
        host - the host name of the origin server
        Returns:
        a reference to this, so the API can be used fluently
      • originSelector

        public HttpProxy originSelector​(Function<io.vertx.mutiny.core.http.HttpServerRequest,​io.smallrye.mutiny.Uni<io.vertx.mutiny.core.net.SocketAddress>> selector)
        Parameters:
        selector - the selector
        Returns:
        a reference to this, so the API can be used fluently
      • addInterceptor

        public HttpProxy addInterceptor​(ProxyInterceptor interceptor)
        Parameters:
        interceptor -
        Returns:
        a reference to this, so the API can be used fluently
      • handle

        public void handle​(io.vertx.mutiny.core.http.HttpServerRequest request)
        Specified by:
        handle in interface io.vertx.core.Handler<io.vertx.mutiny.core.http.HttpServerRequest>
        Parameters:
        request - the outbound HttpServerRequest
      • accept

        public void accept​(io.vertx.mutiny.core.http.HttpServerRequest item)
        Specified by:
        accept in interface Consumer<io.vertx.mutiny.core.http.HttpServerRequest>
      • newInstance

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