Package io.vertx.mutiny.httpproxy
Class HttpProxy
- java.lang.Object
-
- io.vertx.mutiny.httpproxy.HttpProxy
-
- All Implemented Interfaces:
io.vertx.core.Handler<HttpServerRequest>
,Consumer<HttpServerRequest>
public class HttpProxy extends Object implements io.vertx.core.Handler<HttpServerRequest>, Consumer<HttpServerRequest>
Handles the HTTP reverse proxy logic between the user agent and the origin.original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<HttpProxy>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(HttpServerRequest item)
HttpProxy
addInterceptor(ProxyInterceptor interceptor)
boolean
equals(Object o)
io.vertx.httpproxy.HttpProxy
getDelegate()
void
handle(HttpServerRequest request)
int
hashCode()
static HttpProxy
newInstance(io.vertx.httpproxy.HttpProxy arg)
HttpProxy
origin(int port, String host)
HttpProxy
origin(SocketAddress address)
HttpProxy
originSelector(Function<HttpServerRequest,io.smallrye.mutiny.Uni<SocketAddress>> selector)
static HttpProxy
reverseProxy(io.vertx.httpproxy.ProxyOptions options, HttpClient client)
static HttpProxy
reverseProxy(HttpClient client)
String
toString()
-
-
-
Constructor Detail
-
HttpProxy
public HttpProxy(io.vertx.httpproxy.HttpProxy delegate)
-
HttpProxy
public HttpProxy(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.httpproxy.HttpProxy getDelegate()
-
reverseProxy
public static HttpProxy reverseProxy(HttpClient client)
- Parameters:
client
- theHttpClient
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, HttpClient client)
- Parameters:
options
-client
- theHttpClient
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)
- Parameters:
address
- theSocketAddress
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 serverhost
- 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.smallrye.mutiny.Uni<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(HttpServerRequest request)
- Specified by:
handle
in interfaceio.vertx.core.Handler<HttpServerRequest>
- Parameters:
request
- the outboundHttpServerRequest
-
accept
public void accept(HttpServerRequest item)
- Specified by:
accept
in interfaceConsumer<HttpServerRequest>
-
newInstance
public static HttpProxy newInstance(io.vertx.httpproxy.HttpProxy arg)
-
-