Class OriginRequestProvider
- All Implemented Interfaces:
MutinyDelegate
ProxyContext.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
OriginRequestProvider
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOriginRequestProvider(io.vertx.httpproxy.OriginRequestProvider delegate) Create a new instance ofOriginRequestProviderdelegating to the given (non-null) instance ofOriginRequestProvider.OriginRequestProvider(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<HttpClientRequest>create(ProxyContext proxyContext) Create theHttpClientRequestto the origin server for a givenProxyContext.createAndAwait(ProxyContext proxyContext) Create theHttpClientRequestto the origin server for a givenProxyContext.createAndForget(ProxyContext proxyContext) Create theHttpClientRequestto the origin server for a givenProxyContext.booleanstatic OriginRequestProviderfixedAddress(int port, String host) Creates a simple provider for a fixedportandhost.static OriginRequestProviderfixedAddress(io.vertx.core.net.SocketAddress address) Creates a simple provider for a fixedSocketAddress.io.vertx.httpproxy.OriginRequestProviderGet the delegate instance.inthashCode()static OriginRequestProvidernewInstance(io.vertx.httpproxy.OriginRequestProvider delegate) Creates a new instance of theOriginRequestProvider.static OriginRequestProviderselector(Function<ProxyContext, io.smallrye.mutiny.Uni<io.vertx.core.net.SocketAddress>> selector) Creates a provider that selects the origin server based onProxyContext.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OriginRequestProvider
public OriginRequestProvider(io.vertx.httpproxy.OriginRequestProvider delegate) Create a new instance ofOriginRequestProviderdelegating to the given (non-null) instance ofOriginRequestProvider. -
OriginRequestProvider
-
-
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:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
create
@CheckReturnValue public io.smallrye.mutiny.Uni<HttpClientRequest> create(ProxyContext proxyContext) Create theHttpClientRequestto the origin server for a givenProxyContext.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
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.httpproxy.OriginRequestProvider#create(ProxyContext)
-
createAndAwait
Create theHttpClientRequestto the origin server for a givenProxyContext.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 aRuntimeException).- Parameters:
proxyContext- the context of the proxied request and response- Returns:
- The operation result
- See Also:
-
io.vertx.httpproxy.OriginRequestProvider#create(ProxyContext)
-
createAndForget
Create theHttpClientRequestto the origin server for a givenProxyContext.Unlike the bare Vert.x variant, this method ignores the
HttpClientRequestresult 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
Creates a simple provider for a fixedportandhost. -
fixedAddress
Creates a simple provider for a fixedSocketAddress. -
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 onProxyContext. -
newInstance
Creates a new instance of theOriginRequestProvider. -
hashCode
public int hashCode() -
equals
-
toString
-