Class ProxyRequest
- All Implemented Interfaces:
MutinyDelegate
original non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyRequest(io.vertx.httpproxy.ProxyRequest delegate) ProxyRequest(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBody()io.vertx.httpproxy.ProxyRequestio.vertx.core.http.HttpMethodgetURI()inthashCode()headers()static ProxyRequestnewInstance(io.vertx.httpproxy.ProxyRequest arg) io.smallrye.mutiny.Uni<Void>proxy(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.proxyAndAwait(HttpClientRequest request) Blocking variant ofproxy(io.vertx.mutiny.core.http.HttpClientRequest).voidproxyAndForget(HttpClientRequest request) Variant ofproxy(io.vertx.mutiny.core.http.HttpClientRequest)that ignores the result of the operation.release()response()static ProxyRequestreverseProxy(HttpServerRequest proxiedRequest) io.smallrye.mutiny.Uni<ProxyResponse>send(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.sendAndAwait(HttpClientRequest request) Blocking variant ofsend(io.vertx.mutiny.core.http.HttpClientRequest).voidsendAndForget(HttpClientRequest request) Variant ofsend(io.vertx.mutiny.core.http.HttpClientRequest)that ignores the result of the operation.setAuthority(HostAndPort authority) setMethod(io.vertx.core.http.HttpMethod method) toString()io.vertx.core.http.HttpVersionversion()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyRequest
public ProxyRequest(io.vertx.httpproxy.ProxyRequest delegate) -
ProxyRequest
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.ProxyRequest getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
reverseProxy
- Parameters:
proxiedRequest- theHttpServerRequestthat is proxied- Returns:
- a reference to this, so the API can be used fluently
-
version
public io.vertx.core.http.HttpVersion version()- Returns:
- the HTTP version of the proxied request
-
absoluteURI
- Returns:
- the absolute URI of the proxied request
-
getMethod
public io.vertx.core.http.HttpMethod getMethod()- Returns:
- the HTTP method to be sent to the origin server.
-
setMethod
- Parameters:
method- the new HTTP method- Returns:
- a reference to this, so the API can be used fluently
-
getURI
- Returns:
- the request URI to be sent to the origin server.
-
setURI
- Parameters:
uri- the new URI- Returns:
- a reference to this, so the API can be used fluently
-
getBody
- Returns:
- the request body to be sent to the origin server.
-
setBody
- Parameters:
body- the new body- Returns:
- a reference to this, so the API can be used fluently
-
setAuthority
- Parameters:
authority- the authority- Returns:
- a reference to this, so the API can be used fluently
-
getAuthority
- Returns:
- the request authority, for HTTP2 the pseudo header otherwise the header
-
headers
- Returns:
- the headers that will be sent to the origin server, the returned headers can be modified. The headers map is populated with the proxied request headers
-
proxy
Proxy this request to the origin server using the specifiedrequestand then send the proxy response.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
request- the request connected to the origin server- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
proxyAndAwait
Blocking variant ofproxy(io.vertx.mutiny.core.http.HttpClientRequest).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:
request- the request connected to the origin server- Returns:
- the Void instance produced by the operation.
-
proxyAndForget
Variant ofproxy(io.vertx.mutiny.core.http.HttpClientRequest)that ignores the result of the operation.This method subscribes on the result of
proxy(io.vertx.mutiny.core.http.HttpClientRequest), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromproxy(io.vertx.mutiny.core.http.HttpClientRequest)but you don't need to compose it with other operations.- Parameters:
request- the request connected to the origin server
-
send
Send this request to the origin server using the specifiedrequest.The returned future will be completed with the proxy response returned by the origin.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
request- the request connected to the origin server- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
Blocking variant ofsend(io.vertx.mutiny.core.http.HttpClientRequest).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:
request- the request connected to the origin server- Returns:
- the ProxyResponse instance produced by the operation.
-
sendAndForget
Variant ofsend(io.vertx.mutiny.core.http.HttpClientRequest)that ignores the result of the operation.This method subscribes on the result of
send(io.vertx.mutiny.core.http.HttpClientRequest), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsend(io.vertx.mutiny.core.http.HttpClientRequest)but you don't need to compose it with other operations.- Parameters:
request- the request connected to the origin server
-
release
- Returns:
- a reference to this, so the API can be used fluently
-
proxiedRequest
- Returns:
- the proxied HTTP server request
-
response
- Returns:
- the proxy response
-
newInstance
-