Class ProxyResponse
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Julien Viet
- See Also:
-
ProxyResponse
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyResponse(io.vertx.httpproxy.ProxyResponse delegate) Create a new instance ofProxyResponsedelegating to the given (non-null) instance ofProxyResponse.ProxyResponse(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanetag()getBody()Get the body of the response.io.vertx.httpproxy.ProxyResponseGet the delegate instance.intGet the status code.Get the status message.inthashCode()io.vertx.core.MultiMapheaders()longmaxAge()static ProxyResponsenewInstance(io.vertx.httpproxy.ProxyResponse delegate) Creates a new instance of theProxyResponse.booleanrelease()Release the proxy response.request()Return the correspondingProxyRequest.io.smallrye.mutiny.Uni<Void>send()Send the proxies response to the user agent.voidSend the proxies response to the user agent.Send the proxies response to the user agent.Set the request body to be sent to the user agent.setStatusCode(int sc) Set the status code to be sent to the user agent.setStatusMessage(String statusMessage) Set the status message to be sent to the user agent.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyResponse
public ProxyResponse(io.vertx.httpproxy.ProxyResponse delegate) Create a new instance ofProxyResponsedelegating to the given (non-null) instance ofProxyResponse. -
ProxyResponse
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.ProxyResponse 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
-
send
Send the proxies response to the user agent.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.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ProxyResponse.send()
-
sendAndAwait
public void sendAndAwait()Send the proxies response to the user agent.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).- See Also:
-
ProxyResponse.send()
-
sendAndForget
Send the proxies response to the user agent.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ProxyResponse.send()
-
request
Return the correspondingProxyRequest.- Returns:
- the proxy request
-
getStatusCode
public int getStatusCode()Get the status code.- Returns:
- the status code to be sent to the user agent
-
setStatusCode
Set the status code to be sent to the user agent.The initial value is the proxied response status code.
- Parameters:
sc- the status code- Returns:
- a reference to this, so the API can be used fluently
-
getStatusMessage
Get the status message.- Returns:
- the status message to be sent to the user agent
-
setStatusMessage
Set the status message to be sent to the user agent.The initial value is the proxied response status message.
- Parameters:
statusMessage- the status message- Returns:
- a reference to this, so the API can be used fluently
-
headers
public io.vertx.core.MultiMap headers()- Returns:
- the headers that will be sent to the user agent, the returned headers can be modified. The headers map is populated with the proxied response headers
-
getBody
Get the body of the response.- Returns:
- the response body to be sent to the user agent
-
setBody
Set the request body to be sent to the user agent.The initial request body value is the proxied response body.
- Parameters:
body- the new body- Returns:
- a reference to this, so the API can be used fluently
-
proxiedResponse
- Returns:
- the proxied HTTP server response
-
publicCacheControl
public boolean publicCacheControl() -
maxAge
public long maxAge() -
etag
- Returns:
- the
etagsent by the origin response
-
release
Release the proxy response.The proxied response is resumed, no HTTP response is sent to the user-agent
-
newInstance
Creates a new instance of theProxyResponse. -
hashCode
public int hashCode() -
equals
-
toString
-