Package io.vertx.httpproxy
Interface OriginRequestProvider
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface OriginRequestProvider
A provider that creates the request to the origin server based onProxyContext
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Future<HttpClientRequest>
create(ProxyContext proxyContext)
Create theHttpClientRequest
to the origin server for a givenProxyContext
.static OriginRequestProvider
fixedAddress(int port, String host)
Creates a simple provider for a fixedport
andhost
.static OriginRequestProvider
fixedAddress(SocketAddress address)
Creates a simple provider for a fixedSocketAddress
.static OriginRequestProvider
selector(Function<ProxyContext,Future<SocketAddress>> selector)
Creates a provider that selects the origin server based onProxyContext
.
-
-
-
Method Detail
-
fixedAddress
static OriginRequestProvider fixedAddress(int port, String host)
Creates a simple provider for a fixedport
andhost
.
-
fixedAddress
static OriginRequestProvider fixedAddress(SocketAddress address)
Creates a simple provider for a fixedSocketAddress
.
-
selector
static OriginRequestProvider selector(Function<ProxyContext,Future<SocketAddress>> selector)
Creates a provider that selects the origin server based onProxyContext
.
-
create
Future<HttpClientRequest> create(ProxyContext proxyContext)
Create theHttpClientRequest
to the origin server for a givenProxyContext
.- Parameters:
proxyContext
- the context of the proxied request and response- Returns:
- a future, completed with the
HttpClientRequest
or failed
-
-