public interface QueryChannel
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
prepareDisconnect()
Prepares this
QueryChannel to disconnect, by unsubscribing all registered query handlers. |
ResultStream<QueryResponse> |
query(QueryRequest query)
Sends the given
query to AxonServer for routing to the appropriate handlers. |
Registration |
registerQueryHandler(QueryHandler handler,
QueryDefinition... queryTypes)
Registers the given
handler to handle incoming queries defined through the given queryTypes. |
SubscriptionQueryResult |
subscriptionQuery(QueryRequest query,
SerializedObject updateType,
int bufferSize,
int fetchSize)
Sends out a subscription
query to AxonServer for routing to the appropriate handler. |
Registration registerQueryHandler(QueryHandler handler, QueryDefinition... queryTypes)
handler to handle incoming queries defined through the given queryTypes.
Duplicate handlers can be registered.handler - the handler to handle incoming queries withqueryTypes - the QueryDefinitions to register the handler forResultStream<QueryResponse> query(QueryRequest query)
query to AxonServer for routing to the appropriate handlers.query - the QueryRequest to sendResultStream providing the results of query executionSubscriptionQueryResult subscriptionQuery(QueryRequest query, SerializedObject updateType, int bufferSize, int fetchSize)
query to AxonServer for routing to the appropriate handler. Allows for receiving
an initial query result followed by a stream of updates.query - the subscription QueryRequest to sendupdateType - the type of updates expected from this subscription querybufferSize - the number of updates to be buffered by the update result streamfetchSize - the number of updates to be consumed from the update stream prior to refilling itSubscriptionQueryResult containing the initial result and update streamCompletableFuture<Void> prepareDisconnect()
QueryChannel to disconnect, by unsubscribing all registered query handlers. Will wait with
a certain cut off until all acknowledgments of unsubscribing have been received.
This method should be used if a connected client wants to disconnect from AxonServer.
CompletableFuture of Void to react when all query handlers have been unsubscribedCopyright © 2020–2023 AxonIQ BV. All rights reserved.