Class ProxyResponse
java.lang.Object
io.vertx.rxjava3.httpproxy.ProxyResponse
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanetag()getBody()Get the body of the response.intGet the status code.Get the status message.inthashCode()headers()longmaxAge()static ProxyResponsenewInstance(ProxyResponse arg) booleanrelease()Release the proxy response.request()Return the correspondingProxyRequest.rxSend()Send the proxies response to the user agent.send()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
-
ProxyResponse
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
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
- 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
-
send
-
rxSend
-
release
Release the proxy response.The proxied response is resumed, no HTTP response is sent to the user-agent
- Returns:
-
newInstance
-