Class ProxyRequest
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
ProxyRequest
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyRequest(io.vertx.httpproxy.ProxyRequest delegate) Create a new instance ofProxyRequestdelegating to the given (non-null) instance ofProxyRequest.ProxyRequest(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanio.vertx.core.net.HostAndPortgetBody()io.vertx.httpproxy.ProxyRequestGet the delegate instance.io.vertx.core.http.HttpMethodgetURI()inthashCode()io.vertx.core.MultiMapheaders()static ProxyRequestnewInstance(io.vertx.httpproxy.ProxyRequest delegate) Creates a new instance of theProxyRequest.io.smallrye.mutiny.Uni<Void>proxy(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.voidproxyAndAwait(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.proxyAndForget(HttpClientRequest request) Proxy this request to the origin server using the specifiedrequestand then send the proxy response.release()Release the proxy request and its associated resources.response()Create and return the proxy response.static ProxyRequestreverseProxy(HttpServerRequest proxiedRequest) Create a newProxyRequestinstance, the proxied request will be paused.static ProxyRequestreverseProxy(HttpServerRequest proxiedRequest, io.vertx.httpproxy.ForwardedHeadersOptions forwardedHeadersOptions) LikereverseProxy(HttpServerRequest)but using specific Forio.smallrye.mutiny.Uni<ProxyResponse>send(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.sendAndAwait(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.sendAndForget(HttpClientRequest request) Send this request to the origin server using the specifiedrequest.setAuthority(io.vertx.core.net.HostAndPort authority) Set the request authority.Set the request body to be sent to the origin server.setMethod(io.vertx.core.http.HttpMethod method) Set the HTTP method to be sent to the origin server.Set the request URI to be sent to the origin server.toString()io.vertx.core.http.HttpVersionversion()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyRequest
public ProxyRequest(io.vertx.httpproxy.ProxyRequest delegate) Create a new instance ofProxyRequestdelegating to the given (non-null) instance ofProxyRequest. -
ProxyRequest
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.ProxyRequest 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
-
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. 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:
request- the request connected to the origin server- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.httpproxy.ProxyRequest#proxy(HttpClientRequest)
-
proxyAndAwait
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
Void. 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:
request- the request connected to the origin server- See Also:
-
io.vertx.httpproxy.ProxyRequest#proxy(HttpClientRequest)
-
proxyAndForget
Proxy this request to the origin server using the specifiedrequestand then send the proxy response.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
request- the request connected to the origin server- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.httpproxy.ProxyRequest#proxy(HttpClientRequest)
-
send
Send this request to the origin server using the specifiedrequest.The returned uni will be completed with the proxy response returned by the origin.
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:
request- the request connected to the origin server- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.httpproxy.ProxyRequest#send(HttpClientRequest)
-
sendAndAwait
Send this request to the origin server using the specifiedrequest.The returned underlying uni will be completed with the proxy response returned by the origin.
Unlike the bare Vert.x variant, this method returns a
ProxyResponse. 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:
request- the request connected to the origin server- Returns:
- The operation result
- See Also:
-
io.vertx.httpproxy.ProxyRequest#send(HttpClientRequest)
-
sendAndForget
Send this request to the origin server using the specifiedrequest.The returned underlying uni will be completed with the proxy response returned by the origin.
Unlike the bare Vert.x variant, this method ignores the
ProxyResponseresult or any failure.- Parameters:
request- the request connected to the origin server- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.httpproxy.ProxyRequest#send(HttpClientRequest)
-
reverseProxy
Create a newProxyRequestinstance, the proxied request will be paused.- Parameters:
proxiedRequest- theHttpServerRequestthat is proxied- Returns:
- a reference to this, so the API can be used fluently
-
reverseProxy
public static ProxyRequest reverseProxy(HttpServerRequest proxiedRequest, io.vertx.httpproxy.ForwardedHeadersOptions forwardedHeadersOptions) LikereverseProxy(HttpServerRequest)but using specific For -
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
Set the HTTP method to be sent to the origin server.The initial HTTP method value is the proxied request HTTP method.
- 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
Set the request URI to be sent to the origin server.The initial request URI value is the proxied request URI.
- 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
Set the request body to be sent to the origin server.The initial request body value is the proxied request body.
- Parameters:
body- the new body- Returns:
- a reference to this, so the API can be used fluently
-
setAuthority
Set the request authority.- for HTTP/1 the Host header
- for HTTP/2 the :authority pseudo header
- Parameters:
authority- the authority- Returns:
- a reference to this, so the API can be used fluently
-
getAuthority
public io.vertx.core.net.HostAndPort getAuthority()- Returns:
- the request authority, for HTTP2 the :authority pseudo header otherwise the Host header
-
headers
public io.vertx.core.MultiMap 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
-
release
Release the proxy request and its associated resources.The HTTP server request is resumed, no HTTP server response is sent.
- Returns:
- a reference to this, so the API can be used fluently
-
proxiedRequest
- Returns:
- the proxied HTTP server request
-
response
Create and return the proxy response.- Returns:
- the proxy response
-
newInstance
Creates a new instance of theProxyRequest. -
hashCode
public int hashCode() -
equals
-
toString
-