Class HttpProxy

    • Constructor Detail

      • HttpProxy

        public HttpProxy​(HttpProxy delegate)
      • HttpProxy

        public HttpProxy​(Object delegate)
    • Method Detail

      • hashCode

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

        public static HttpProxy reverseProxy​(HttpClient client)
        Create a new HttpProxy instance.
        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​(ProxyOptions options,
                                             HttpClient client)
        Create a new HttpProxy instance.
        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​(SocketAddress address)
        Set the SocketAddress of the origin.
        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)
        Set the host name and port number of the origin.
        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<HttpServerRequest,​io.reactivex.rxjava3.core.Single<SocketAddress>> selector)
        Set a selector that resolves the origin address based on the incoming HTTP request.
        Parameters:
        selector - the selector
        Returns:
        a reference to this, so the API can be used fluently
      • addInterceptor

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