public interface WebSocketSubprotocolHandler
| Modifier and Type | Method and Description |
|---|---|
void |
cancelMulti(String operationId)
Cancels an active subscription with the given ID.
|
void |
cancelUni(String operationId)
Cancels an active single-result operation with the given ID.
|
void |
close()
Called when the websocket should be closed (for example, when the GraphQL client is being closed).
|
io.smallrye.mutiny.Uni<Void> |
ensureInitialized()
This is called to initialize the websocket connection and prepare it for executing operations.
|
String |
executeMulti(javax.json.JsonObject request,
io.smallrye.mutiny.subscription.MultiEmitter<? super String> emitter)
Requests an execution of a subscription operation over the websocket.
|
String |
executeUni(javax.json.JsonObject request,
io.smallrye.mutiny.subscription.UniEmitter<? super String> emitter)
Requests an execution of a single-result operation over the websocket.
|
io.smallrye.mutiny.Uni<Void> ensureInitialized()
String executeUni(javax.json.JsonObject request, io.smallrye.mutiny.subscription.UniEmitter<? super String> emitter)
request - Request in full JSON format describing the operation to be executed.emitter - Emitter that should receive the completion event (or an error) when the operation finishes.String executeMulti(javax.json.JsonObject request, io.smallrye.mutiny.subscription.MultiEmitter<? super String> emitter)
request - Request in full JSON format describing the operation to be executed.emitter - Emitter that should receive the completion events (or an error) from the subscription.void cancelUni(String operationId)
operationId - ID of the operation (returned from calling `executeUni`)void cancelMulti(String operationId)
operationId - ID of the operation (returned from calling `executeMulti`)void close()
Copyright © 2018–2022. All rights reserved.