Class ProxyInterceptor
- java.lang.Object
-
- io.vertx.mutiny.httpproxy.ProxyInterceptor
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<ProxyInterceptor>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description ProxyInterceptor(io.vertx.httpproxy.ProxyInterceptor delegate)
ProxyInterceptor(Object delegate)
-
Method Summary
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<ProxyInterceptor> __TYPE_ARG
-
-
Constructor Detail
-
ProxyInterceptor
public ProxyInterceptor(io.vertx.httpproxy.ProxyInterceptor delegate)
-
ProxyInterceptor
public ProxyInterceptor(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.httpproxy.ProxyInterceptor getDelegate()
-
handleProxyRequest
@CheckReturnValue public io.smallrye.mutiny.Uni<ProxyResponse> handleProxyRequest(ProxyContext context)
Handle the proxy request at the stage of this interceptor.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
context
- the proxy context- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
handleProxyRequestAndAwait
public ProxyResponse handleProxyRequestAndAwait(ProxyContext context)
Blocking variant ofhandleProxyRequest(io.vertx.mutiny.httpproxy.ProxyContext)
.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).
- Parameters:
context
- the proxy context- Returns:
- the ProxyResponse instance produced by the operation.
-
handleProxyRequestAndForget
public void handleProxyRequestAndForget(ProxyContext context)
Variant ofhandleProxyRequest(io.vertx.mutiny.httpproxy.ProxyContext)
that ignores the result of the operation.This method subscribes on the result of
handleProxyRequest(io.vertx.mutiny.httpproxy.ProxyContext)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromhandleProxyRequest(io.vertx.mutiny.httpproxy.ProxyContext)
but you don't need to compose it with other operations.- Parameters:
context
- the proxy context
-
handleProxyResponse
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> handleProxyResponse(ProxyContext context)
Handle the proxy response at the stage of this interceptor.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
context
- the proxy context- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
handleProxyResponseAndAwait
public Void handleProxyResponseAndAwait(ProxyContext context)
Blocking variant ofhandleProxyResponse(io.vertx.mutiny.httpproxy.ProxyContext)
.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).
- Parameters:
context
- the proxy context- Returns:
- the Void instance produced by the operation.
-
handleProxyResponseAndForget
public void handleProxyResponseAndForget(ProxyContext context)
Variant ofhandleProxyResponse(io.vertx.mutiny.httpproxy.ProxyContext)
that ignores the result of the operation.This method subscribes on the result of
handleProxyResponse(io.vertx.mutiny.httpproxy.ProxyContext)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromhandleProxyResponse(io.vertx.mutiny.httpproxy.ProxyContext)
but you don't need to compose it with other operations.- Parameters:
context
- the proxy context
-
newInstance
public static ProxyInterceptor newInstance(io.vertx.httpproxy.ProxyInterceptor arg)
-
-