Interface QueryHandler
- All Superinterfaces:
MessageHandler
- All Known Subinterfaces:
QueryHandlingComponent
- All Known Implementing Classes:
AnnotatedQueryHandlingComponent,SimpleQueryHandlingComponent
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface describing a handler of
queries.- Since:
- 5.0.0
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionhandle(QueryMessage query, ProcessingContext context) Handles the givenquerywithin the givencontext.
-
Method Details
-
handle
@Nonnull MessageStream<QueryResponseMessage> handle(@Nonnull QueryMessage query, @Nonnull ProcessingContext context) Handles the givenquerywithin the givencontext.The resulting
streammay contain zero, one, or Nresponse messages.- Parameters:
query- The query to handle.context- The context to the givencommandis handled in.- Returns:
- A
MessagesStreamof zero, one, or Nresponse messages.
-