Class OriginRequestProvider

java.lang.Object
io.vertx.mutiny.httpproxy.OriginRequestProvider
All Implemented Interfaces:
MutinyDelegate

public class OriginRequestProvider extends Object implements MutinyDelegate
A provider that creates the request to the origin server based on ProxyContext.

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

  • Field Details

  • Constructor Details

    • OriginRequestProvider

      public OriginRequestProvider(io.vertx.httpproxy.OriginRequestProvider delegate)
    • OriginRequestProvider

      public OriginRequestProvider(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.httpproxy.OriginRequestProvider getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • fixedAddress

      public static OriginRequestProvider fixedAddress(int port, String host)
      Parameters:
      port -
      host -
      Returns:
    • fixedAddress

      public static OriginRequestProvider fixedAddress(SocketAddress address)
      Parameters:
      address -
      Returns:
    • selector

      public static OriginRequestProvider selector(Function<ProxyContext,io.smallrye.mutiny.Uni<SocketAddress>> selector)
      Parameters:
      selector -
      Returns:
    • create

      @CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> create(ProxyContext proxyContext)
      Create the to the origin server for a given ProxyContext.

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Parameters:
      proxyContext - the context of the proxied request and response
      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • createAndAwait

      public HttpClientRequest createAndAwait(ProxyContext proxyContext)
      Blocking variant of create(io.vertx.mutiny.httpproxy.ProxyContext).

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Parameters:
      proxyContext - the context of the proxied request and response
      Returns:
      the HttpClientRequest instance produced by the operation.
    • createAndForget

      public void createAndForget(ProxyContext proxyContext)
      Variant of create(io.vertx.mutiny.httpproxy.ProxyContext) that ignores the result of the operation.

      This method subscribes on the result of create(io.vertx.mutiny.httpproxy.ProxyContext), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from create(io.vertx.mutiny.httpproxy.ProxyContext) but you don't need to compose it with other operations.

      Parameters:
      proxyContext - the context of the proxied request and response
    • newInstance

      public static OriginRequestProvider newInstance(io.vertx.httpproxy.OriginRequestProvider arg)