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.

See Also:
  • OriginRequestProvider
  • Field Details

  • Constructor Details

    • OriginRequestProvider

      public OriginRequestProvider(io.vertx.httpproxy.OriginRequestProvider delegate)
      Create a new instance of OriginRequestProvider delegating to the given (non-null) instance of OriginRequestProvider.
    • OriginRequestProvider

      public OriginRequestProvider(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.httpproxy.OriginRequestProvider getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • create

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

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      proxyContext - the context of the proxied request and response
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • io.vertx.httpproxy.OriginRequestProvider#create(ProxyContext)
    • createAndAwait

      public HttpClientRequest createAndAwait(ProxyContext proxyContext)
      Create the HttpClientRequest to the origin server for a given ProxyContext.

      Unlike the bare Vert.x variant, this method returns a HttpClientRequest. This method awaits indefinitely 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 operation result
      See Also:
      • io.vertx.httpproxy.OriginRequestProvider#create(ProxyContext)
    • createAndForget

      public OriginRequestProvider createAndForget(ProxyContext proxyContext)
      Create the HttpClientRequest to the origin server for a given ProxyContext.

      Unlike the bare Vert.x variant, this method ignores the HttpClientRequest result or any failure.

      Parameters:
      proxyContext - the context of the proxied request and response
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • io.vertx.httpproxy.OriginRequestProvider#create(ProxyContext)
    • fixedAddress

      public static OriginRequestProvider fixedAddress(int port, String host)
      Creates a simple provider for a fixed port and host.
    • fixedAddress

      public static OriginRequestProvider fixedAddress(io.vertx.core.net.SocketAddress address)
      Creates a simple provider for a fixed SocketAddress.
    • selector

      public static OriginRequestProvider selector(Function<ProxyContext,io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>> selector)
      Creates a provider that selects the origin server based on ProxyContext.
    • newInstance

      public static OriginRequestProvider newInstance(io.vertx.httpproxy.OriginRequestProvider delegate)
      Creates a new instance of the OriginRequestProvider.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object