Package io.vertx.mutiny.httpproxy
Class ProxyResponse
- java.lang.Object
-
- io.vertx.mutiny.httpproxy.ProxyResponse
-
public class ProxyResponse extends Object
Handles the interoperability of the response between the origin and the user agent. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ProxyResponse>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description ProxyResponse(io.vertx.httpproxy.ProxyResponse delegate)
ProxyResponse(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
etag()
Body
getBody()
io.vertx.httpproxy.ProxyResponse
getDelegate()
int
getStatusCode()
String
getStatusMessage()
int
hashCode()
MultiMap
headers()
long
maxAge()
static ProxyResponse
newInstance(io.vertx.httpproxy.ProxyResponse arg)
boolean
publicCacheControl()
ProxyResponse
release()
ProxyRequest
request()
io.smallrye.mutiny.Uni<Void>
send()
Send the proxies response to the user agent.Void
sendAndAwait()
Blocking variant ofsend()
.void
sendAndForget()
Variant ofsend()
that ignores the result of the operation.ProxyResponse
setBody(Body body)
ProxyResponse
setStatusCode(int sc)
ProxyResponse
setStatusMessage(String statusMessage)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ProxyResponse> __TYPE_ARG
-
-
Constructor Detail
-
ProxyResponse
public ProxyResponse(io.vertx.httpproxy.ProxyResponse delegate)
-
ProxyResponse
public ProxyResponse(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.httpproxy.ProxyResponse getDelegate()
-
request
public ProxyRequest request()
- Returns:
- the proxy request
-
getStatusCode
public int getStatusCode()
- Returns:
- the status code to be sent to the user agent
-
setStatusCode
public ProxyResponse setStatusCode(int sc)
- Parameters:
sc
- the status code- Returns:
- a reference to this, so the API can be used fluently
-
getStatusMessage
public String getStatusMessage()
- Returns:
- the status message to be sent to the user agent
-
setStatusMessage
public ProxyResponse setStatusMessage(String statusMessage)
- Parameters:
statusMessage
- the status message- Returns:
- a reference to this, so the API can be used fluently
-
headers
public 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
public Body getBody()
- Returns:
- the response body to be sent to the user agent
-
setBody
public ProxyResponse setBody(Body body)
- 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
public String etag()
- Returns:
- the
etag
sent by the origin response
-
send
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> 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
public Void 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
public ProxyResponse release()
- Returns:
- the instance of ProxyResponse to chain method calls.
-
newInstance
public static ProxyResponse newInstance(io.vertx.httpproxy.ProxyResponse arg)
-
-