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 theHttpClientRequestto the origin server for a givenProxyContext.static OriginRequestProviderfixedAddress(int port, String host)Creates a simple provider for a fixedportandhost.static OriginRequestProviderfixedAddress(SocketAddress address)Creates a simple provider for a fixedSocketAddress.static OriginRequestProviderselector(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 fixedportandhost.
-
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 theHttpClientRequestto the origin server for a givenProxyContext.- Parameters:
proxyContext- the context of the proxied request and response- Returns:
- a future, completed with the
HttpClientRequestor failed
-
-