Package io.vertx.mutiny.httpproxy
Class OriginRequestProvider
java.lang.Object
io.vertx.mutiny.httpproxy.OriginRequestProvider
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOriginRequestProvider
(io.vertx.httpproxy.OriginRequestProvider delegate) OriginRequestProvider
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<HttpClientRequest>
create
(ProxyContext proxyContext) Create the to the origin server for a givenProxyContext
.createAndAwait
(ProxyContext proxyContext) Blocking variant ofcreate(io.vertx.mutiny.httpproxy.ProxyContext)
.void
createAndForget
(ProxyContext proxyContext) Variant ofcreate(io.vertx.mutiny.httpproxy.ProxyContext)
that ignores the result of the operation.boolean
static OriginRequestProvider
fixedAddress
(int port, String host) static OriginRequestProvider
fixedAddress
(SocketAddress address) io.vertx.httpproxy.OriginRequestProvider
int
hashCode()
static OriginRequestProvider
newInstance
(io.vertx.httpproxy.OriginRequestProvider arg) static OriginRequestProvider
selector
(Function<ProxyContext, io.smallrye.mutiny.Uni<SocketAddress>> selector) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OriginRequestProvider
public OriginRequestProvider(io.vertx.httpproxy.OriginRequestProvider delegate) -
OriginRequestProvider
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.OriginRequestProvider getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
fixedAddress
- Parameters:
port
-host
-- Returns:
-
fixedAddress
- 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 givenProxyContext
.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
Blocking variant ofcreate(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
Variant ofcreate(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 fromcreate(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
-