public interface HttpProxy
extends io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>
| Modifier and Type | Method and Description |
|---|---|
void |
handle(io.vertx.core.http.HttpServerRequest outboundRequest)
Handle the outbound
HttpServerRequest. |
default HttpProxy |
origin(int port,
java.lang.String host)
Set the host name and port number of the origin.
|
default HttpProxy |
origin(io.vertx.core.net.SocketAddress address)
Set the
SocketAddress of the origin. |
HttpProxy |
originSelector(java.util.function.Function<HttpServerRequestContext,io.vertx.core.Future<io.vertx.core.net.SocketAddress>> selector)
Set a selector that resolves the origin address based on the
outbound request.
|
HttpProxy |
responseHook(java.util.function.BiConsumer<HttpServerRequestContext,ProxyResponse> responseHook) |
static HttpProxy |
reverseProxy(io.vertx.core.http.HttpClient client)
Create a new
HttpProxy instance. |
static HttpProxy |
reverseProxy(ProxyOptions options,
io.vertx.core.http.HttpClient client)
Create a new
HttpProxy instance. |
static HttpProxy reverseProxy(io.vertx.core.http.HttpClient client)
HttpProxy instance.client - the HttpClient that forwards outbound
requests to the origin.static HttpProxy reverseProxy(ProxyOptions options, io.vertx.core.http.HttpClient client)
HttpProxy instance.client - the HttpClient that forwards outbound
requests to the origin.default HttpProxy origin(io.vertx.core.net.SocketAddress address)
SocketAddress of the origin.address - the SocketAddress of the origindefault HttpProxy origin(int port, java.lang.String host)
port - the port number of the origin serverhost - the host name of the origin serverHttpProxy originSelector(java.util.function.Function<HttpServerRequestContext,io.vertx.core.Future<io.vertx.core.net.SocketAddress>> selector)
selector - the selectorHttpProxy responseHook(java.util.function.BiConsumer<HttpServerRequestContext,ProxyResponse> responseHook)
void handle(io.vertx.core.http.HttpServerRequest outboundRequest)
HttpServerRequest.handle in interface io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>outboundRequest - the outbound HttpServerRequestCopyright © 2022. All Rights Reserved.