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 on `ProxyContext`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Future<HttpClientRequest>` | `create​(ProxyContext proxyContext)` | Create the `HttpClientRequest` to the origin server for a given `ProxyContext`.
    `static OriginRequestProvider` | `fixedAddress​(int port, String host)` | Creates a simple provider for a fixed `port` and `host`.
    `static OriginRequestProvider` | `fixedAddress​(SocketAddress address)` | Creates a simple provider for a fixed `SocketAddress`.
    `static OriginRequestProvider` | `selector​(Function<ProxyContext,​Future<SocketAddress>> selector)` | Creates a provider that selects the origin server based on `ProxyContext`.

- - ### Method Detail

    - #### fixedAddress

          static OriginRequestProvider fixedAddress​(int port,
                                                    String host)

      Creates a simple provider for a fixed `port` and `host`.

    - #### fixedAddress

          static OriginRequestProvider fixedAddress​(SocketAddress address)

      Creates a simple provider for a fixed `SocketAddress`.

    - #### selector

          static OriginRequestProvider selector​(Function<ProxyContext,​Future<SocketAddress>> selector)

      Creates a provider that selects the origin server based on `ProxyContext`.

    - #### create

          Future<HttpClientRequest> create​(ProxyContext proxyContext)

      Create the `HttpClientRequest` to the origin server for a given `ProxyContext`.
      Parameters:
        `proxyContext` - the context of the proxied request and response
      Returns:
        a future, completed with the `HttpClientRequest` or failed