Class ProxyContext
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
ProxyContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProxyContext(io.vertx.httpproxy.ProxyContext delegate) Create a new instance ofProxyContextdelegating to the given (non-null) instance ofProxyContext.ProxyContext(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionclient()boolean<T> TGet a payload attached to this context.io.vertx.httpproxy.ProxyContextGet the delegate instance.inthashCode()booleanstatic ProxyContextnewInstance(io.vertx.httpproxy.ProxyContext delegate) Creates a new instance of theProxyContext.request()response()io.smallrye.mutiny.Uni<ProxyResponse>Unlike the bare Vert.x variant, this method returns aUni.Unlike the bare Vert.x variant, this method returns aProxyResponse.Unlike the bare Vert.x variant, this method ignores theProxyResponseresult or any failure.io.smallrye.mutiny.Uni<Void>Unlike the bare Vert.x variant, this method returns aUni.voidUnlike the bare Vert.x variant, this method returns aVoid.Unlike the bare Vert.x variant, this method ignores theVoidresult or any failure.voidAttach a payload to the context.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ProxyContext
public ProxyContext(io.vertx.httpproxy.ProxyContext delegate) Create a new instance ofProxyContextdelegating to the given (non-null) instance ofProxyContext. -
ProxyContext
-
-
Method Details
-
getDelegate
public io.vertx.httpproxy.ProxyContext getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
sendRequest
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ProxyContext.sendRequest()
-
sendRequestAndAwait
Unlike the bare Vert.x variant, this method returns a
ProxyResponse. This method awaits indefinitely 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 aRuntimeException).- Returns:
- The operation result
- See Also:
-
ProxyContext.sendRequest()
-
sendRequestAndForget
Unlike the bare Vert.x variant, this method ignores the
ProxyResponseresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ProxyContext.sendRequest()
-
sendResponse
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ProxyContext.sendResponse()
-
sendResponseAndAwait
public void sendResponseAndAwait()Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
ProxyContext.sendResponse()
-
sendResponseAndForget
Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ProxyContext.sendResponse()
-
request
- Returns:
- the proxy request
-
response
- Returns:
- the proxy response, it might be
nullif the response has not been sent
-
isWebSocket
public boolean isWebSocket()- Returns:
- if this request or response is the handshake of WebSocket
-
set
Attach a payload to the context.- Parameters:
name- the payload namevalue- any payload value
-
get
Get a payload attached to this context.- Parameters:
name- the payload nametype- the expected payload type- Returns:
- the attached payload
-
client
- Returns:
- the
HttpClientuse to interact with the origin server
-
newInstance
Creates a new instance of theProxyContext. -
hashCode
public int hashCode() -
equals
-
toString
-