Class ProxyContext
- java.lang.Object
-
- io.vertx.mutiny.httpproxy.ProxyContext
-
public class ProxyContext extends Object
A controller for proxy interception. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ProxyContext>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description ProxyContext(io.vertx.httpproxy.ProxyContext delegate)ProxyContext(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)<T> Tget(String name, Class<T> type)io.vertx.httpproxy.ProxyContextgetDelegate()inthashCode()static ProxyContextnewInstance(io.vertx.httpproxy.ProxyContext arg)ProxyRequestrequest()ProxyResponseresponse()io.smallrye.mutiny.Uni<ProxyResponse>sendRequest()Unlike the bare Vert.x variant, this method returns aUni.ProxyResponsesendRequestAndAwait()Blocking variant ofsendRequest().voidsendRequestAndForget()Variant ofsendRequest()that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>sendResponse()Unlike the bare Vert.x variant, this method returns aUni.VoidsendResponseAndAwait()Blocking variant ofsendResponse().voidsendResponseAndForget()Variant ofsendResponse()that ignores the result of the operation.voidset(String name, Object value)StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ProxyContext> __TYPE_ARG
-
-
Constructor Detail
-
ProxyContext
public ProxyContext(io.vertx.httpproxy.ProxyContext delegate)
-
ProxyContext
public ProxyContext(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.httpproxy.ProxyContext getDelegate()
-
request
public ProxyRequest request()
- Returns:
- the proxy request
-
response
public ProxyResponse response()
- Returns:
- the proxy response, it might be
nullif the response has not been sent
-
sendRequest
@CheckReturnValue public io.smallrye.mutiny.Uni<ProxyResponse> sendRequest()
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
sendRequestAndAwait
public ProxyResponse sendRequestAndAwait()
Blocking variant ofsendRequest().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 ProxyResponse instance produced by the operation.
-
sendRequestAndForget
public void sendRequestAndForget()
Variant ofsendRequest()that ignores the result of the operation.This method subscribes on the result of
sendRequest(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsendRequest()but you don't need to compose it with other operations.
-
sendResponse
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> sendResponse()
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
sendResponseAndAwait
public Void sendResponseAndAwait()
Blocking variant ofsendResponse().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.
-
sendResponseAndForget
public void sendResponseAndForget()
Variant ofsendResponse()that ignores the result of the operation.This method subscribes on the result of
sendResponse(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsendResponse()but you don't need to compose it with other operations.
-
set
public void set(String name, Object value)
- Parameters:
name- the payload namevalue- any payload value
-
get
public <T> T get(String name, Class<T> type)
- Parameters:
name- the payload nametype- the expected payload type- Returns:
- the attached payload
-
newInstance
public static ProxyContext newInstance(io.vertx.httpproxy.ProxyContext arg)
-
-