@FunctionalInterface public interface QueryHandler
| Modifier and Type | Interface and Description |
|---|---|
static interface |
QueryHandler.UpdateHandler
Interface describing a stream of updates to a subscription query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(QueryRequest query,
ReplyChannel<QueryResponse> responseHandler)
Handle the given
query, using given responseHandler to send the response(s). |
default Registration |
registerSubscriptionQuery(SubscriptionQuery query,
QueryHandler.UpdateHandler updateHandler)
Registers an incoming subscription query request, represented by given
query, using given updateHandler to send updates when the projection for this query changes. |
void handle(QueryRequest query, ReplyChannel<QueryResponse> responseHandler)
query, using given responseHandler to send the response(s).
Note that the query must be completed using ReplyChannel.complete() or ReplyChannel.sendLast(Object).
query - the message representing the query requestresponseHandler - to handler to send responses withdefault Registration registerSubscriptionQuery(SubscriptionQuery query, QueryHandler.UpdateHandler updateHandler)
query, using given updateHandler to send updates when the projection for this query changes.
If this handler doesn't support subscription queries for the given query, it should return null.
Otherwise, it must return a handle that can be used to cancel the subscription query.
query - the message representing the queryupdateHandler - to handler to send updates withnull if this handler doesn't support the
subscription queryCopyright © 2020–2021 AxonIQ BV. All rights reserved.