Package io.vertx.mutiny.httpproxy
Class ProxyResponse
java.lang.Object
io.vertx.mutiny.httpproxy.ProxyResponse
- All Implemented Interfaces:
MutinyDelegate
Handles the interoperability of the response between the origin and the user agent.
NOTE: This class has been automatically generated from the
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyResponse
(io.vertx.httpproxy.ProxyResponse delegate) ProxyResponse
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
etag()
getBody()
io.vertx.httpproxy.ProxyResponse
int
int
hashCode()
headers()
long
maxAge()
static ProxyResponse
newInstance
(io.vertx.httpproxy.ProxyResponse arg) boolean
release()
request()
io.smallrye.mutiny.Uni<Void>
send()
Send the proxies response to the user agent.Blocking variant ofsend()
.void
Variant ofsend()
that ignores the result of the operation.setStatusCode
(int sc) setStatusMessage
(String statusMessage) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyResponse
public ProxyResponse(io.vertx.httpproxy.ProxyResponse delegate) -
ProxyResponse
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.ProxyResponse getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
request
- Returns:
- the proxy request
-
getStatusCode
public int getStatusCode()- Returns:
- the status code to be sent to the user agent
-
setStatusCode
- Parameters:
sc
- the status code- Returns:
- a reference to this, so the API can be used fluently
-
getStatusMessage
- Returns:
- the status message to be sent to the user agent
-
setStatusMessage
- Parameters:
statusMessage
- the status message- Returns:
- a reference to this, so the API can be used fluently
-
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
- Returns:
- the response body to be sent to the user agent
-
setBody
- Parameters:
body
- the new body- Returns:
- a reference to this, so the API can be used fluently
-
publicCacheControl
public boolean publicCacheControl() -
maxAge
public long maxAge() -
etag
- Returns:
- the
etag
sent by the origin response
-
send
Send the proxies response to the user agent.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendAndAwait
Blocking variant ofsend()
.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).
- Returns:
- the Void instance produced by the operation.
-
sendAndForget
public void sendAndForget() -
release
- Returns:
- the instance of ProxyResponse to chain method calls.
-
newInstance
-