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 theoriginal
non 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 boolean
equals(Object o)
<T> T
get(String name, Class<T> type)
io.vertx.httpproxy.ProxyContext
getDelegate()
int
hashCode()
static ProxyContext
newInstance(io.vertx.httpproxy.ProxyContext arg)
ProxyRequest
request()
ProxyResponse
response()
io.smallrye.mutiny.Uni<ProxyResponse>
sendRequest()
Unlike the bare Vert.x variant, this method returns aUni
.ProxyResponse
sendRequestAndAwait()
Blocking variant ofsendRequest()
.void
sendRequestAndForget()
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
.Void
sendResponseAndAwait()
Blocking variant ofsendResponse()
.void
sendResponseAndForget()
Variant ofsendResponse()
that ignores the result of the operation.void
set(String name, Object value)
String
toString()
-
-
-
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
null
if 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
uni
firing 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
uni
firing 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)
-
-