io.vertx.rxjava3.httpproxy

## Class HttpProxy

- java.lang.Object
- - io.vertx.rxjava3.httpproxy.HttpProxy

- All Implemented Interfaces:
    Handler<HttpServerRequest>

      public class HttpProxy
      extends Object
      implements Handler<HttpServerRequest>

  Handles the HTTP reverse proxy logic between the user agent and the origin.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<HttpProxy>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpProxy(HttpProxy delegate)`
    `HttpProxy(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpProxy` | `addInterceptor(ProxyInterceptor interceptor)` Add an interceptor to the interceptor chain.
    `boolean` | `equals(Object o)`
    `HttpProxy` | `getDelegate()`
    `void` | `handle(HttpServerRequest request)` Handle the outbound `HttpServerRequest`.
    `int` | `hashCode()`
    `static HttpProxy` | `newInstance(HttpProxy arg)`
    `HttpProxy` | `origin(int port, String host)` Set the host name and port number of the origin.
    `HttpProxy` | `origin(SocketAddress address)` Set the `SocketAddress` of the origin.
    `HttpProxy` | `originSelector(java.util.function.Function<HttpServerRequest,Single<SocketAddress>> selector)` Set a selector that resolves the origin address based on the incoming HTTP request.
    `static HttpProxy` | `reverseProxy(HttpClient client)` Create a new `HttpProxy` instance.
    `static HttpProxy` | `reverseProxy(ProxyOptions options, HttpClient client)` Create a new `HttpProxy` instance.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<HttpProxy> __TYPE_ARG

  - ### Constructor Detail

    - #### HttpProxy

          public HttpProxy(HttpProxy delegate)

    - #### HttpProxy

          public HttpProxy(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public HttpProxy getDelegate()

    - #### reverseProxy

          public static HttpProxy reverseProxy(HttpClient client)

      Create a new `HttpProxy` instance.
      Parameters:
        `client` - the `HttpClient` that forwards outbound requests to the origin.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### reverseProxy

          public static HttpProxy reverseProxy(ProxyOptions options,
                                               HttpClient client)

      Create a new `HttpProxy` instance.
      Parameters:
        `options` -
        `client` - the `HttpClient` 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)

      Set the `SocketAddress` of the origin.
      Parameters:
        `address` - the `SocketAddress` of the origin
      Returns:
        a reference to this, so the API can be used fluently

    - #### origin

          public HttpProxy origin(int port,
                                  String host)

      Set the host name and port number of the origin.
      Parameters:
        `port` - the port number of the origin server
        `host` - the host name of the origin server
      Returns:
        a reference to this, so the API can be used fluently

    - #### originSelector

          public HttpProxy originSelector(java.util.function.Function<HttpServerRequest,Single<SocketAddress>> selector)

      Set a selector that resolves the origin address based on the incoming HTTP request.
      Parameters:
        `selector` - the selector
      Returns:
        a reference to this, so the API can be used fluently

    - #### addInterceptor

          public HttpProxy addInterceptor(ProxyInterceptor interceptor)

      Add an interceptor to the interceptor chain.
      Parameters:
        `interceptor` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### handle

          public void handle(HttpServerRequest request)

      Handle the outbound `HttpServerRequest`.
      Specified by:
        `handle` in interface `Handler<HttpServerRequest>`
      Parameters:
        `request` - the outbound `HttpServerRequest`

    - #### newInstance

          public static HttpProxy newInstance(HttpProxy arg)

Copyright © 2024 Eclipse. All rights reserved.